Revision: 596
Author: [email protected]
Date: Tue Jul 28 12:07:42 2009
Log: issue#101 - undo r562.
http://code.google.com/p/piccolo2d/source/detail?r=596
Modified:
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PNode.java
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/swt/SWTBenchTest.java
/piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java
/piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwingEventHandler.java
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/PSWTPath.java
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java
=======================================
--- /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PNode.java
Mon Jul 27 14:10:14 2009
+++ /piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/PNode.java
Tue Jul 28 12:07:42 2009
@@ -2637,7 +2637,8 @@
printJob.print();
}
catch (PrinterException e) {
- throw new RuntimeException("Error Printing", e);
+ System.out.println("Error Printing");
+ e.printStackTrace();
}
}
}
=======================================
---
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/swt/SWTBenchTest.java
Sat Jul 25 06:29:38 2009
+++
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/swt/SWTBenchTest.java
Tue Jul 28 12:07:42 2009
@@ -399,7 +399,8 @@
results = new int[NUM_CONTEXTS][NUM_TESTS];
}
catch (IOException e) {
- throw new RuntimeException(e);
+ e.printStackTrace();
+ System.exit(1);
}
}
=======================================
---
/piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java
Sat Jul 25 06:29:38 2009
+++
/piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/event/PNotificationCenter.java
Tue Jul 28 12:07:42 2009
@@ -267,8 +267,7 @@
catch (InvocationTargetException e) {
// Since this is how Swing handles Exceptions that get
// thrown on listeners, it's probably ok to do it here.
- // mro: if Swing does it wrong we don't have to.
- throw new RuntimeException(e);
+ e.printStackTrace();
}
}
}
=======================================
---
/piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwingEventHandler.java
Mon Jul 27 15:02:47 2009
+++
/piccolo2d.java/trunk/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwingEventHandler.java
Tue Jul 28 12:07:42 2009
@@ -360,12 +360,11 @@
private void cameraToLocal(PCamera topCamera, Point2D pt, PNode node) {
AffineTransform inverse;
try {
- inverse = topCamera.getViewTransform().createInverse();
- }
- catch (NoninvertibleTransformException e) {
+ inverse = topCamera.getViewTransform().createInverse();
+ } catch (NoninvertibleTransformException e) {
throw new PAffineTransformException(e,
topCamera.getViewTransform());
}
-
+
/*
* Only apply the camera's view transform when this node is a
descendant
* of PLayer
@@ -409,11 +408,10 @@
}
}
else {
- // what was that? an exception to format syslog output?
- throw new
RuntimeException("PInputEvent.getSourceSwingEvent was not a MouseEvent.
Actual event: "
- + sourceSwingEvent + ", class=" +
sourceSwingEvent.getClass().getName());
- }
- }
+ new Exception("PInputEvent.getSourceSwingEvent was not a
MouseEvent. Actual event: "
+ + sourceSwingEvent + ", class=" +
sourceSwingEvent.getClass().getName()).printStackTrace();
+ }
+ }
}
/**
=======================================
---
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/PSWTPath.java
Sat Jul 25 06:39:02 2009
+++
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/PSWTPath.java
Tue Jul 28 12:07:42 2009
@@ -383,8 +383,7 @@
return new Line2D.Double(l2.getP1(), l2.getP2());
}
else {
- // either throw an exception or don't. But don't just write to
sysout
- // new Exception().printStackTrace();
+ new Exception().printStackTrace();
GeneralPath aPath = new GeneralPath();
aPath.append(aShape, false);
return aPath;
=======================================
---
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java
Sat Jul 25 06:29:38 2009
+++
/piccolo2d.java/trunk/swt/src/main/java/edu/umd/cs/piccolox/swt/SWTGraphics2D.java
Tue Jul 28 12:07:42 2009
@@ -121,7 +121,7 @@
SWTShapeManager.transform(aRect, transform.createInverse());
}
catch (Exception e) {
- throw new RuntimeException(e);
+ e.printStackTrace();
}
return aRect;
}
@@ -182,7 +182,7 @@
SWTShapeManager.transform(aRect, transform.createInverse());
}
catch (Exception e) {
- throw new RuntimeException(e);
+ e.printStackTrace();
}
return aRect;
}
@@ -311,7 +311,7 @@
sizeInt =
Integer.parseInt(size.substring(size.indexOf("=") + 1, size.length()));
}
catch (Exception e) {
- throw new RuntimeException(e);
+ e.printStackTrace();
}
cachedFont = new org.eclipse.swt.graphics.Font(device,
--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---