RubyKernel.raise(context, runtime.getKernel(), new IRubyObject[] { exception }, Block.NULL_BLOCK);
}
private static void raiseParserException(ThreadContext context, IRubyObject yaml, MarkedYAMLException mye, IRubyObject rbPath) {
Ruby runtime;
Mark mark;
RubyClass se;
IRubyObject exception;
runtime = context.runtime;
se = (RubyClass)runtime.getModule("Psych").getConstant("SyntaxError");
mark = mye.getProblemMark();
exception = se.newInstance(context,
new IRubyObject[] {
rbPath,
runtime.newFixnum(mark.getLine() + 1),
runtime.newFixnum(mark.getColumn() + 1),
runtime.newFixnum(mark.getIndex()),
(null == mye.getProblem() ? runtime.getNil() : runtime.newString(mye.getProblem())),
(null == mye.getContext() ? runtime.getNil() : runtime.newString(mye.getContext()))
},
Block.NULL_BLOCK);