Revision: 22319
Author:   brainslog
Date:     Tue Apr 10 19:41:19 2012
Log: Fixing "Diameter: Improve error message when AvpDataException is thrown"

Fixes Issue 3178
http://code.google.com/p/mobicents/source/detail?r=22319

Modified:
/trunk/servers/diameter/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/parser/AvpImpl.java

=======================================
--- /trunk/servers/diameter/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/parser/AvpImpl.java Mon Mar 12 14:23:47 2012 +++ /trunk/servers/diameter/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/parser/AvpImpl.java Tue Apr 10 19:41:19 2012
@@ -123,7 +123,7 @@
       return parser.bytesToUtf8String(rawData);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

@@ -132,7 +132,7 @@
       return parser.bytesToInt(rawData);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

@@ -141,7 +141,7 @@
       return parser.bytesToLong(rawData);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

@@ -152,7 +152,7 @@
       return parser.bytesToLong(u32ext);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

@@ -161,7 +161,7 @@
       return parser.bytesToLong(rawData);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

@@ -170,7 +170,7 @@
       return parser.bytesToFloat(rawData);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

@@ -179,7 +179,7 @@
       return parser.bytesToDouble(rawData);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

@@ -188,7 +188,7 @@
       return parser.bytesToAddress(rawData);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

@@ -197,7 +197,7 @@
       return parser.bytesToDate(rawData);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

@@ -206,7 +206,7 @@
       return parser.bytesToOctetString(rawData);
     }
     catch (Exception e) {
-      throw new AvpDataException(this);
+      throw new AvpDataException(e, this);
     }
   }

Reply via email to