From 6b504a88c5f4f7ed407618c52bd6172bf0f1904d Mon Sep 17 00:00:00 2001 From: Stephane Landelle Date: Wed, 28 Oct 2015 09:21:31 +0100 Subject: [PATCH] Fill Exception message when maximum String literal length is exceeded Gatling compiles Scala classes on the fly with Zinc. Be it a program bug or a user error, some Strings sometimes end up being longer than the maximum String length. It would be nice if we could get an Exception with the proper message. I guess there's the same issue with maximum file size and maximum method size, will check. --- src/main/java/scala/tools/asm/ByteVector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/scala/tools/asm/ByteVector.java b/src/main/java/scala/tools/asm/ByteVector.java index 3bca7af..4754a7f 100644 --- a/src/main/java/scala/tools/asm/ByteVector.java +++ b/src/main/java/scala/tools/asm/ByteVector.java @@ -210,7 +210,7 @@ public ByteVector putLong(final long l) { public ByteVector putUTF8(final String s) { int charLength = s.length(); if (charLength > 65535) { - throw new IllegalArgumentException(); + throw new IllegalArgumentException("Maximum String literal length exceeded"); } int len = length; if (len + 2 + charLength > data.length) {