Questions tagged [exceptions]

For questions about the implementation of exceptions in a programming language or the handling of exceptions in a compiler or interpreter. Do not use this tag for generic programming questions about an exception you've encountered, as those belong on Stack Overflow.

Filter by
Sorted by
Tagged with
13 votes
3 answers
1k views

What was the purpose of Tartan's "disable" statement?

The Tartan language, designed during the process that eventually led to Ada, has a disable statement defined as follows: A disable declaration in an inner block ...
Solal Pirelli's user avatar
6 votes
1 answer
174 views

Is it fine to target .wat instead of .wasm and use wat2wasm?

IIRC the WebAssembly text format (.wat) is not able to express everything .wasm can, such as binary (custom) sections. I'm not sure about the current state of WebAssembly text and binary formats now ...
Hydroper's user avatar
  • 899
4 votes
1 answer
111 views

Modifying call stack locations for C++ exceptions

Having done my type checker, I'm thinking on targetting C++. How can I efficiently add debugging information to thrown exceptions? Similiar to JavaScript, you can throw anything. ...
Hydroper's user avatar
  • 899
10 votes
1 answer
198 views

How to implement resume

There is a feature called resume in these languages/articles, which can re-enter the position of perform during catch. https://...
Aster's user avatar
  • 2,616
8 votes
5 answers
270 views

Are checked exceptions inherently inconvenient? How to design them in a more ergonomic manner?

In Java, checked exceptions are well-known to be extremely unergonomic, to the point that many people circumvent them. Evidently, checking exceptions, if done properly, can lead to a more robust code—...
Luiz Felipe's user avatar
9 votes
3 answers
215 views

How to compile exceptions?

What are the most common ways of compiling code of a language with first-class support for exceptions, such as C++? Panics in Rust, which have similar behavior, shouldn't be too different. From my ...
Luiz Felipe's user avatar