Thanks for this really great gem!
It helps a lot checking the types of objects being send up and down the stack trough method calls and returns. Sadly there's still no way to check the type of objects being send trough the stack by the Ruby raise and throw commands.
I'm thinking about something similar to throws Exception in Java.
(sure this isn't Java and the checking can only be done dynamically, not statically)
public void example() throws Exception {
throw new Exception();
}
What do you think about adding such an feature to Contracts?
- Would it technically be possible?
- What could be a nice and backward compatible syntax?
See also: #193
Thanks for this really great gem!
It helps a lot checking the types of objects being send up and down the stack trough method calls and returns. Sadly there's still no way to check the type of objects being send trough the stack by the Ruby
raiseandthrowcommands.I'm thinking about something similar to
throws Exceptionin Java.(sure this isn't Java and the checking can only be done dynamically, not statically)
What do you think about adding such an feature to Contracts?
See also: #193