From 1f203dc168cd4ab457d9690bc78766fe63da2cf9 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Mon, 29 Apr 2013 16:50:13 -0700 Subject: Improve exception detail message (cherry picked from commit 345a87a2e40955ad999e56cbd3674ccc95e16537) Change-Id: I4ecb9d07bd3bf50cdcfe67c21a53181dfcbc670b --- dex/src/main/java/com/android/dex/EncodedValueReader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dex/src/main/java/com/android/dex/EncodedValueReader.java b/dex/src/main/java/com/android/dex/EncodedValueReader.java index a263464..6f60538 100644 --- a/dex/src/main/java/com/android/dex/EncodedValueReader.java +++ b/dex/src/main/java/com/android/dex/EncodedValueReader.java @@ -280,8 +280,8 @@ public final class EncodedValueReader { private void checkType(int expected) { if (peek() != expected) { - throw new IllegalStateException("Expected array but was " - + Integer.toHexString(peek())); + throw new IllegalStateException( + String.format("Expected %x but was %x", expected, peek())); } } } -- cgit v1.1