00001 /* 00002 * Copyright 2006 Phidgets Inc. All rights reserved. 00003 */ 00004 00005 package com.phidgets.event; 00006 00007 import com.phidgets.Phidget; 00008 import com.phidgets.PhidgetException; 00009 00015 public class ErrorEvent 00016 { 00017 Phidget source; 00018 PhidgetException exception; 00019 00025 public ErrorEvent(Phidget source, PhidgetException ex) { 00026 this.source = source; 00027 this.exception = ex; 00028 } 00029 00037 public Phidget getSource() { 00038 return source; 00039 } 00040 00046 public PhidgetException getException() 00047 { 00048 return exception; 00049 } 00050 00056 public String toString() { 00057 return "Error Event (" + exception.getErrorNumber() + "): " + exception.getDescription(); 00058 } 00059 }