code cleanup for unused declarations in custom exceptions