Closed nohwnd closed 7 years ago
I'd say string first, but no strong opinion.
I'd like to see both behaviors possible. You could filter on type primarily as this is similar to the pattern we use with try/catch. A second parameter should be available for filtering by message and further parameters for other exception properties.
Assert throw will pass if any exception is thrown, but often we need to refine what exception we expected and what were it's properties. Which parameter is more useful to be provided by position? The type or the message?