fix(compile): add `new` when throwing an error

Add a `new` when throwing an error