[Swift-commit] cog r3426
swift at ci.uchicago.edu
swift at ci.uchicago.edu
Mon Jul 9 23:30:04 CDT 2012
------------------------------------------------------------------------
r3426 | hategan | 2012-07-09 23:28:10 -0500 (Mon, 09 Jul 2012) | 1 line
and if the handler gets a null exception, make sure not to crash
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/GetFileHandler.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/GetFileHandler.java (revision 3425)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/file/coaster/handlers/GetFileHandler.java (working copy)
@@ -138,8 +138,13 @@
}
public void error(IOHandle op, Exception e) {
- getChannel().sendTaggedReply(getId(), e.getMessage() != null ? e.getMessage().getBytes() : e.toString().getBytes(),
+ if (e == null) {
+ getChannel().sendTaggedReply(getId(), "Unknown error".getBytes(), KarajanChannel.FINAL_FLAG + KarajanChannel.ERROR_FLAG);
+ }
+ else {
+ getChannel().sendTaggedReply(getId(), e.getMessage() != null ? e.getMessage().getBytes() : e.toString().getBytes(),
KarajanChannel.FINAL_FLAG + KarajanChannel.ERROR_FLAG);
+ }
}
public void length(long len) {
More information about the Swift-commit
mailing list