Revert "got rid of exceptions in extern class"

This reverts commit bff2bc5c025082466e01ff1a26db0212069900c4.
Revert "extern class"

This reverts commit 222e8325ae6b15b7be53f1d42e199ff697bbc7eb.