Throw .net exception to JS

To address issue #5.