NativeException wrapper that prints the full nested stack trace of the Java exception and all of its causes wrapped by the NativeException. NativeException by default reveals only the first cause, which is insufficient for tracing cascading.jruby errors into JRuby code or revealing underlying Janino expression problems.
Fetch cause at depth. If depth is not provided, root cause is returned.
# File lib/cascading/cascading_exception.rb, line 18 def cause(depth = @depth) if depth > @depth warn "WARNING: Depth (#{depth}) greater than depth of cause stack (#{@depth}) requested" nil else fetch_cause(@ne, depth) end end
# File lib/cascading/cascading_exception.rb, line 10 def initialize(native_exception, message) @ne = native_exception trace, @depth = trace_causes(@ne, 1) summary, _ = trace_causes(@ne, 1, true) super("#{message}\n#{trace}\nException summary for: #{message}\n#{summary}") end