function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Does anything survive an uncaught exception?

If I am running some Apex code that generates an uncaught exception, everything is rolled back automatically - changes to records, send emails, future tasks, etc.

Is there anything that does not get rolled back?

The reason I am asking is because I wish to provide an audit log of operations (even unsuccessful ones).  Obviously there is the debug log, but that only appears if enabled, doesn't handle managed packages very well, and no longer appears for Sites guest users unless you jump through hoops (which isn't always possible).

Any suggestions gratefully received.