Created
June 24, 2018 21:36
-
-
Save joseoliv/51e4db75232e9bef1357364090a0312c to your computer and use it in GitHub Desktop.
checkCatchParameter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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