On Thu, Sep 10, 2009 at 11:41 PM, Hirotsugu Asari <[email protected]> wrote:
> I wanted to stub methods. Until fully fleshed out, I wanted to throw
> NotImpmentedError with message "methodX is not implemented".
Mmm, yes...the only way to do that at the moment is to have separate
entry points that call a common "not implemented" method or to force
the method to be framed and get the name from the frame. Here's an
example from RubyProcess:
@JRubyMethod(name = {"to_int", "pid", "stopped?", "stopsig",
"signaled?", "termsig?", "exited?", "coredump?"}, frame = true)
public IRubyObject not_implemented() {
String error = "Process::Status#" +
getRuntime().getCurrentContext().getFrameName() + " not implemented";
throw getRuntime().newNotImplementedError(error);
}
I'd like to make the method binding a bit cleaner so that you can also
have it pass in the name dispatched and the method object used for
dispatch, but no plans to work on that right now.
- Charlie
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email