If I am running some Apex code that generates an uncaught exception, everything is rolled back automatically - changes to records, sent 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).