Selective stack trace generation during java exception handling
Abstract
Systems and methods for selective stack trace generation during Java exception handling are disclosed. In embodiments, a method includes determining, by a Java virtual machine (JVM) of a computing device, that an exception object escapes a catch block of Java bytecodes; setting, by the JVM of the computing device, an escaped flag based on the determining that the exception object escapes the catch block; walking, by the JVM of the computing device, a call stack to locate an applicable catch block for the exception object, wherein the applicable catch block is the catch block; determining, by the JVM of the computing device, that the escaped flag is set in response to locating the applicable catch block; and creating, by the JVM of the computing device, a stack trace based on the determining that the escaped flag is set.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 11 · Forward citations: 1.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computing device to cause the computing device to: create, by a Java virtual machine (JVM), an exception object in response to an exception event; determine, by the JVM, whether the exception object has escaped the catch block by performing a data flow walk by a bytecode verifier of the JVM; set an escaped flag for the catch block upon determining that the exception object has escaped the catch block; determine, by the JVM, whether an
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (1 of 1 total)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 11,442,739 B2 | Exception handling | 2022 | 1 |
References Cited — Backward Prior Art (11)
Non-Patent Literature (3)
- Anonymous, “How uncaught exceptions are handled”, http://www.javamex.com/tutorials/exceptions/exceptions_uncaught_handler.shtml, accessed Oct. 18, 2018, 3 pages.
- Janssen, “How to Specify and Handle Exceptions in Java”, https://stackify.com/specify-handle-exceptions-java/, Jul. 17, 2017, 9 pages.
- Jiang et al., “A debugging approach for java runtime exceptions based on program slicing and stack traces”, http://ieeexplore.ieee.org/document/5562992/, 2010 10th International Conference on Quality Software (QSIC), Jul. 14-15, 2010, 3 pages.