Hacker News new | ask | show | jobs
by Paul_S 3572 days ago
Would probably be a good idea to have a no-exceptions version.
1 comments

You can compile Cap'n Proto with -fno-exceptions, and it does a bunch of things differently to make that work. Basically, invalid-input exceptions instead replace the invalid data with a reasonable default value and set a flag on the side that you can query to see if there was any invalid input. Assertion failure exceptions (where there is no way to recover) largely turn into fatal errors.