Commits

Rhys ! committed af16f88 Draft

removed unnecessary exception message duplication

  • Participants
  • Parent commits d6037bf

Comments (0)

Files changed (3)

File src/org/bert_rpc/DecodingException.java

 package org.bert_rpc;
 
+/**
+ * Signals that the provided input cannot be decoded according to the BERT
+ * spec to an interoperable object.
+ */
 public class DecodingException extends Exception {
     public DecodingException(String message) {
         super(message);

File src/org/bert_rpc/Encoder.java

                     (int) Math.floor(millis % 1e3)));
         } catch (EncodingException e) {
             throw new RuntimeException(
-                    "somehow failed to encode date (" + e.getMessage()
-                    + "). this is a bug in jbert.",
+                    "somehow failed to encode date. this is a bug in jbert.",
                     e);
         }
     }
         try {
             this.writeComplexTuple(new Tuple(Constants.$bert, representation));
         } catch (EncodingException e) {
-            throw new RuntimeException("somehow failed to encode boolean (" +
-                    e.getMessage() + "). this is a bug in jbert.", e);
+            throw new RuntimeException("somehow failed to encode boolean. " +
+                    "this is a bug in jbert.", e);
         }
     }
 
             this.writeComplexTuple(new Tuple(Constants.$bert, Constants.$nil));
         } catch (EncodingException e) {
             throw new RuntimeException(
-                    "somehow failed to encode null (" + e.getMessage() +
-                    "). this is a bug in jbert.",
+                    "somehow failed to encode null. this is a bug in jbert.",
                     e);
         }
     }
                     regex.pattern().getBytes("UTF8"),
                     flags));
         } catch (EncodingException e) {
-            throw new RuntimeException("somehow failed to encode regex (" +
-                    e.getMessage() + "). this is a bug in jbert.", e);
+            throw new RuntimeException("somehow failed to encode regex. " +
+                    "this is a bug in jbert.", e);
         }
     }
 }

File src/org/bert_rpc/EncodingException.java

 package org.bert_rpc;
 
+/**
+ * Signals that the provided object cannot be encoded according to the BERT
+ * spec to an interoperable output.
+ */
 public class EncodingException extends Exception {
     public EncodingException(String message) {
         super(message);