add exceptions js basic implementation and fix issue #12