Enhanced exception encoding (it is now constructor-independent and does not use inner exceptions)