Issue #12, refactoring mergeThrownTypes and addThrownType