Exceptions for javascript