When the ruby libs fail parsing the JSON (jedi) message, send the
ruby stacktrace to a file for later investigation.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
}
servlet.add_handler("json2edi" ) { |a_string|
File.open('/tmp/ruby_json2edi.tmp', 'w') {|f| f.write(a_string) } # debugging, so we can compare what we rec'd w/ the orig. file
- @map = OpenILS::Mapper.from_json(a_string)
- @map.to_s
+ begin
+ @map = OpenILS::Mapper.from_json(a_string)
+ @map.to_s
+ rescue => exc
+ File.open('/tmp/edi_webrick-exception', 'w') {|f| f.write(exc.backtrace.inspect) }
+ raise "#{exc.message}: #{exc.backtrace}"
+ end
}
servlet.add_introspection