From 5ffce181a04139fb6716ee09cc9d4ddaf227c549 Mon Sep 17 00:00:00 2001 From: Florian Frank Date: Fri, 20 Aug 2010 09:45:05 +0200 Subject: better debugging message --- CHANGES | 1 + lib/json/common.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 8216a20..0dd9378 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ 2010-08-15 (1.5.0) * Included Java source codes for the Jruby extension made by Daniel Luz . + * Output full exception message of deep_const_get to aid debugging. 2010-08-09 (1.4.6) * Fixed oversight reported in http://github.com/flori/json/issues/closed#issue/23, always create a new object from the state prototype. diff --git a/lib/json/common.rb b/lib/json/common.rb index b530670..1c91672 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -40,8 +40,8 @@ module JSON else begin p.const_missing(c) - rescue NameError - raise ArgumentError, "can't find const #{path}" + rescue NameError => e + raise ArgumentError, "can't get const #{path}: #{e}" end end end -- cgit v1.2.1