Declaring possible exception types in throw clause