Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/KernelNodes.java @ 13659:62bfc12dc9e1
Ruby: more tidy up.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Wed, 15 Jan 2014 19:54:48 +0000 |
parents | 497fada09efb |
children |
comparison
equal
deleted
inserted
replaced
13658:50c11b9a7fdf | 13659:62bfc12dc9e1 |
---|---|
627 return raise(frame, exceptionClass, getContext().makeString("")); | 627 return raise(frame, exceptionClass, getContext().makeString("")); |
628 } | 628 } |
629 | 629 |
630 @Specialization(order = 3) | 630 @Specialization(order = 3) |
631 public Object raise(VirtualFrame frame, RubyClass exceptionClass, RubyString message) { | 631 public Object raise(VirtualFrame frame, RubyClass exceptionClass, RubyString message) { |
632 final RubyContext context = getContext(); | |
633 | |
634 if (context.getConfiguration().getPrintRubyExceptions()) { | |
635 context.implementationMessage("Ruby raise: %s", message); | |
636 new Exception().printStackTrace(); | |
637 } | |
638 | |
639 final RubyBasicObject exception = exceptionClass.newInstance(); | 632 final RubyBasicObject exception = exceptionClass.newInstance(); |
640 initialize.dispatch(frame, exception, null, message); | 633 initialize.dispatch(frame, exception, null, message); |
641 throw new RaiseException(exception); | 634 throw new RaiseException(exception); |
642 } | 635 } |
643 | 636 |