grain
grain copied to clipboard
Cannot re-export an exception
It's not currently possible to re-export an exception in Grain as there is no syntax to do so. One might try this:
test.gr
export exception Foo
test2.gr
import { Foo } from "./test"
export Foo
and they'd be greeted with this unhelpful internal error message:
/Users/oscar/Development/grain/cli/bin/grainc.exe: internal error, uncaught exception:
Not_found
This happens because export followed by a capitalized identifier looks for a type to export.