class X sig MyEventHandler(a as int, b as int) event myEvent as MyEventHandler def main is shared pass def run raise NotImplementedException # .error. Use "throw" instead of "raise" for the exception "NotImplementedException". raise int # .error. Invalid expression for raising events raise .myEvent(0, 1) # .error. Cannot call events. The general form is x = X() raise x.myEvent, 1, 2 # .error. Cannot raise events for other objects. class Foo def bar x = X() raise x.myEvent, 1, 2 # .error. Cannot raise events for other objects.