Various technical articles, IT-related tutorials, software information, and development journals
Tuesday, June 30, 2020
Kotlin JS should usually catch Throwable
As I worked on starting a Node application in Kotlin JS, I found that one of my endpoints failed when tested by Invoke-WebRequest with an error about an incomplete response. I knew this indicated a crash in my endpoint handler, but it was not obvious how to get details on what went wrong. A try-catch block to handle Exceptions did not catch anything. Changing the catch block to handle all Throwables, however, caught the problem and was able to display it.
Labels:
kotlin
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment