Author: olga
Date: Fri Mar 28 14:17:51 2008
New Revision: 642389

URL: http://svn.apache.org/viewvc?rev=642389&view=rev
Log:
PIG-172: dealing with NULL error messages in exceptions

Modified:
    incubator/pig/trunk/CHANGES.txt
    incubator/pig/trunk/src/org/apache/pig/tools/grunt/Utils.java

Modified: incubator/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/CHANGES.txt?rev=642389&r1=642388&r2=642389&view=diff
==============================================================================
--- incubator/pig/trunk/CHANGES.txt (original)
+++ incubator/pig/trunk/CHANGES.txt Fri Mar 28 14:17:51 2008
@@ -184,3 +184,5 @@
 
     PIG-94: changes for M2 of streaming: input/ouptut/ ship/cache error
     handling
+
+    PIG-172: dealing with NULL error messages in exceptions

Modified: incubator/pig/trunk/src/org/apache/pig/tools/grunt/Utils.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/tools/grunt/Utils.java?rev=642389&r1=642388&r2=642389&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/tools/grunt/Utils.java (original)
+++ incubator/pig/trunk/src/org/apache/pig/tools/grunt/Utils.java Fri Mar 28 
14:17:51 2008
@@ -21,7 +21,7 @@
     static Exception getPermissionException(Exception top){
         Throwable current = top;
 
-        while (current != null && current.getMessage().indexOf("Permission 
denied") == -1){
+        while (current != null && (current.getMessage() == null || 
current.getMessage().indexOf("Permission denied") == -1)){
             current = current.getCause();
         }
         return (Exception)current;


Reply via email to