From 334d63651255887a05c0dacebc370ed4b960dc89 Mon Sep 17 00:00:00 2001 From: Vlad Dumitrescu Date: Fri, 11 Nov 2011 15:24:44 +0100 Subject: Improve error message when creating a too long OtpErlangAtom Also print the value that we tried to use for the atom. This helps a lot when debugging and doesn't affect anything when the length is normal. --- lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java index 4d53447164..60eef7a126 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java @@ -53,7 +53,7 @@ public class OtpErlangAtom extends OtpErlangObject implements Serializable, if (atom.length() > maxAtomLength) { throw new java.lang.IllegalArgumentException("Atom may not exceed " - + maxAtomLength + " characters"); + + maxAtomLength + " characters: " + atom); } this.atom = atom; } -- cgit v1.2.3