compile AssertionException to js