Skip to main content

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
2 votes
0 answers
71 views

Is there a guide for implementing exceptions in languages with explicit memory management?

I'm looking for a guide for implementing exceptions in a language with explicit memory management like C++. However, the language's type system and exception handling semantics are incompatible with C+...
feldentm's user avatar
  • 1,929
7 votes
5 answers
772 views

Exception handling: is one exception type sufficient?

(This question is somewhat related to Exception handling: 'catch' without explicit 'try') Context I'm working on a new general-purpose programming language. Exception handling is ...
Thomas Mueller's user avatar
3 votes
5 answers
854 views

Exception handling: 'catch' without explicit 'try'

(I was not aware of this site and asked, by mistake, a similar question on cs.stackexchange as well. It is related to this question on this site.) Context I'm working on a new general-purpose ...
Thomas Mueller's user avatar
14 votes
3 answers
2k 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
7 votes
2 answers
293 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
  • 1,017
5 votes
1 answer
150 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
  • 1,017
10 votes
1 answer
217 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
  • 3,238
9 votes
5 answers
334 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
263 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