Thrown to indicate that a method has been invoked at an illegal or inappropriate time or that the internal state of an object is incompatible with the call.
Use toString to extract details on the error occurred.

Constructor

new(message:String, ?previous:Exception, ?native:Any)