/** * Create a new {@code JRubyException}, * wrapping the given JRuby {@code RaiseException}. * @param ex the cause (must not be {@code null}) */ public JRubyExecutionException(RaiseException ex) { super(ex.getMessage(), ex); } }
public static RubyRegexp newRegexp(Ruby runtime, ByteList pattern, RegexpOptions options) { try { return new RubyRegexp(runtime, pattern, options.clone()); } catch (RaiseException re) { throw runtime.newSyntaxError(re.getMessage()); } }
public static RubyRegexp newRegexp(Ruby runtime, ByteList pattern, RegexpOptions options) { try { return new RubyRegexp(runtime, pattern, options.clone()); } catch (RaiseException re) { throw runtime.newSyntaxError(re.getMessage()); } }
public static RubyRegexp newRegexp(Ruby runtime, ByteList pattern, RegexpOptions options) { try { return new RubyRegexp(runtime, pattern, (RegexpOptions)options.clone()); } catch (RaiseException re) { throw runtime.newSyntaxError(re.getMessage()); } }
public static RubyRegexp newRegexp(Ruby runtime, ByteList pattern, RegexpOptions options) { try { return new RubyRegexp(runtime, pattern, (RegexpOptions)options.clone()); } catch (RaiseException re) { throw runtime.newSyntaxError(re.getMessage()); } }
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, RegexpOptions options) { try { return new RubyRegexp(runtime, pattern.getByteList(), options.clone()); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, int joniOptions) { try { RegexpOptions options = RegexpOptions.fromJoniOptions(joniOptions); return new RubyRegexp(runtime, pattern.getByteList(), options); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, int joniOptions) { try { RegexpOptions options = RegexpOptions.fromJoniOptions(joniOptions); return new RubyRegexp(runtime, pattern.getByteList(), options); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, int joniOptions) { try { RegexpOptions options = RegexpOptions.fromJoniOptions(joniOptions); return new RubyRegexp(runtime, pattern.getByteList(), options); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, RegexpOptions options) { try { return new RubyRegexp(runtime, pattern.getByteList(), (RegexpOptions)options.clone()); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, RegexpOptions options) { try { return new RubyRegexp(runtime, pattern.getByteList(), options.clone()); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, RegexpOptions options) { try { return new RubyRegexp(runtime, pattern.getByteList(), (RegexpOptions)options.clone()); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, int joniOptions) { try { RegexpOptions options = RegexpOptions.fromJoniOptions(joniOptions); return new RubyRegexp(runtime, pattern.getByteList(), options); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexpEmbedded19(Ruby runtime, IRubyObject[] strings, int embeddedOptions) { try { RegexpOptions options = RegexpOptions.fromEmbeddedOptions(embeddedOptions); RubyString pattern = preprocessDRegexp(runtime, strings, options); return new RubyRegexp(runtime, pattern.getByteList(), options); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexpEmbedded19(Ruby runtime, IRubyObject[] strings, int embeddedOptions) { try { RegexpOptions options = RegexpOptions.fromEmbeddedOptions(embeddedOptions); RubyString pattern = preprocessDRegexp(runtime, strings, options); return new RubyRegexp(runtime, pattern.getByteList(), options); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public void checkRegexpFragment(Ruby runtime, ByteList value, RegexpOptions options) { setRegexpEncoding(runtime, value, options); ThreadContext context = runtime.getCurrentContext(); IRubyObject $ex = context.getErrorInfo(); try { RubyRegexp.preprocessCheck(runtime, value); } catch (RaiseException re) { context.setErrorInfo($ex); compile_error(re.getMessage()); } }
public static RubyRegexp newDRegexpEmbedded(Ruby runtime, RubyString pattern, int embeddedOptions) { try { RegexpOptions options = RegexpOptions.fromEmbeddedOptions(embeddedOptions); // FIXME: Massive hack (fix in DRegexpNode too for interpreter) if (pattern.getEncoding() == USASCIIEncoding.INSTANCE) { pattern.setEncoding(ASCIIEncoding.INSTANCE); } return new RubyRegexp(runtime, pattern.getByteList(), options); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public static RubyRegexp newDRegexpEmbedded(Ruby runtime, RubyString pattern, int embeddedOptions) { try { RegexpOptions options = RegexpOptions.fromEmbeddedOptions(embeddedOptions); // FIXME: Massive hack (fix in DRegexpNode too for interpreter) if (pattern.getEncoding() == USASCIIEncoding.INSTANCE) { pattern.setEncoding(ASCIIEncoding.INSTANCE); } return new RubyRegexp(runtime, pattern.getByteList(), options); } catch (RaiseException re) { throw runtime.newRegexpError(re.getMessage()); } }
public void checkRegexpFragment(Ruby runtime, ByteList value, RegexpOptions options) { setRegexpEncoding(runtime, value, options); ThreadContext context = runtime.getCurrentContext(); IRubyObject $ex = context.getErrorInfo(); try { RubyRegexp.preprocessCheck(runtime, value); } catch (RaiseException re) { context.setErrorInfo($ex); compile_error(re.getMessage()); } }
public IRubyObject call() throws Exception { ThreadContext context = runtime.getCurrentContext(); try { return body.call(context); } catch (RaiseException re) { RubyKernel.puts(context, body.getBinding().getSelf(), new IRubyObject[] { RubyString.newString(runtime, "joroutine terminated with error: " + re.getMessage())}); RubyKernel.puts(context, body.getBinding().getSelf(), new IRubyObject[] {re.getException().backtrace()}); throw re; } }