Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
checkCatchParameter
package metaobjectTest
@doc{*
checkCatchParameter checks whether each parameter to a catch: selector
has at least one 'eval:' method, each of them accepting one parameter whose
type is subprototype of CyException
*}
object CheckCatchParameter
func run {
// ok, self has an eval: method that accepts a
// parameter that inherits from CyException
self catch: self;
/*
if uncommented, there is a compile-error
because Int does not have an eval: method
*/
// self catch: 0;
}
func eval: ExceptionStr e { }
@checkCatchParameter
func catch: Any e {
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.