Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Dinosaur here. The VAX architecture had call stack as well as exception handling essentially implemented in silicon: there was a place for an exception handler in each call frame (at least that's how the kernel implemented it for VMS).

It would go up the stack looking for a handler, call it, and then return to executing code where the exception was thrown; or at least that was an option. (Some page faults were handled this way.)

I've looked for this in a language implementation ever since, in vain. Why isn't "I fixed it, try again" ever an option?

(And I consider myself a C programmer, not a C++ programmer, although I acknowledge that most C compilers these days are really C++ compilers.)



The Common Lisp condition system[1] supports this.

[1] https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node312.html


As a more direct analogue of your VMS example, Windows provides system-level support for handling exceptions without unwinding the stack.

Here's an example of page fault handling, using Microsoft C/C++ compiler extensions to access Windows' built-in exception handling,

https://docs.microsoft.com/en-us/windows/win32/memory/reserv...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: