prodot / ReCommended-Extension

Code analysis improvements and context actions
Apache License 2.0
59 stars 11 forks source link

Improve "more specific exception" and "exception should only be thrown by the CLR" warnings #4

Open zwitbaum opened 8 years ago

zwitbaum commented 8 years ago

Please show the warning message "A more specific exception should be used." as well as the "The exception should only be thrown by the CLR" only for exceptions described in the rule CA2201: Do not raise reserved exception types.

Please add an information to the rule, e.g. " (CA2201)" to the warning message to provide more information for reason of the warning.

For other non-specific exception types like e.g. WarningException please show a hint message to suggest the user to throw a more specific exception like described in CA2201.

NN--- commented 3 years ago

Updated documentation link: CA2201: Do not raise reserved exception types

michael-damatov commented 3 years ago

Updated analyzer for "unthrowable" exception (two exceptions were missing). This will be part of the next minor release.