From c19df6f710ed03f956224e3d4a57610e7a50bb71 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 23 Jun 2008 02:06:55 +0000 Subject: [PATCH] throw more helpful exceptions when serialized form broken --- weaver/src/org/aspectj/weaver/AjAttribute.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weaver/src/org/aspectj/weaver/AjAttribute.java b/weaver/src/org/aspectj/weaver/AjAttribute.java index 413c754f2..47e5fbf0b 100644 --- a/weaver/src/org/aspectj/weaver/AjAttribute.java +++ b/weaver/src/org/aspectj/weaver/AjAttribute.java @@ -123,8 +123,10 @@ public abstract class AjAttribute { w.getMessageHandler().handleMessage(MessageUtil.warn("unknown attribute encountered "+name)); return null; } + } catch (BCException e) { + throw new BCException("malformed " + name + " attribute (length:"+bytes.length+")" + e ); } catch (IOException e) { - throw new BCException("malformed " + name + " attribute " + e); + throw new BCException("malformed " + name + " attribute (length:"+bytes.length+")" + e ); } } -- 2.39.5