Fixed gendarme issue by addin serialization to exception