I've pushed a new version with a lot of changes - please approve the MR (or comment) if it looks good to you.
Increasing exception object reference on throw looks strange. Do you know what's the rationale behind it? I see that it matches with Windows, I don't understand why it's needed.