Define TipJSError Object
modified to throw an 'Error Object' when throw error