class X sig FooSig event foo as FooSig def main is shared throw Exception # .error. Try instantiating it throw X # .error. Also, this type does not inherit from Exception throw X() # .error. because it does not inherit from Exception def bar throw .foo # .error. it is an event, not an exception