TypeErrors aren't caught by application
See original GitHub issuePlatform: iOS TNS: 3.1.0
It’s been like this since 2.5 (or maybe even earlier) for me. My {N} applications do not catch any TypeErrors.
Say I make this typing error:
function test() {
this.options = { foo: false };
this.optoins.foo = true;
}
In the function I mistype this.options as this.optoins. But the terminal doesn’t log the error unless I wrap the code in a try/catch. Developing an application without TypeError logging by default slows down the development process A LOT. How can I fix this?
I know there is an event inside the application module called uncaughtErrorEvent, but this is about a TypeErrorEvent, which doesn’t seem to exist.
Thanks in advance!
<bountysource-plugin>Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
javascript - How to pass catch error inside function into parent
You can just throw it again and again until the app crashes :D ... responses depending on the error type (ReferenceError, TypeError, etc)....
Read more >TypeError - JavaScript - MDN Web Docs
A TypeError may be thrown when: an operand or argument passed to a function is incompatible with the type expected by that operator...
Read more >How to Throw Exceptions in Python - Rollbar
And it's your application's job—and your job as a coder—to catch ... Python throws the TypeError exception when there are wrong data types....
Read more >Built-in Exceptions — Python 3.11.1 documentation
A TypeError is raised if note is not a string. ... The exception inherits from BaseException so as to not be accidentally caught...
Read more >Types of Exceptions in Java - Stackify
The parent class of all the exception classes is the java.lang.Exception class. ... You can manage them with the help of try-catch blocks....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Type errors are now caught by uncaughtErrorEvent on both iOS and Android
I’m also running into a TypeError and it is not caught by
applicationOn(uncaughtErrorEvent). I trigger it by adding a(tap)="functionName"wherefunctionNameis not defined. I get error:I was hoping stuff like this would be caught by
applicationOn(uncaughtErrorEvent).