Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created September 7, 2019 17:00
Embed
What would you like to do?
try {
DoSomethingRisky();
} catch (InvalidOperationException ex) {
if (ex.Message.StartsWith("Cannot access the")) {
// Some specialized handling logic
} else {
throw ex; // We don't have a specific solution for this. Rethrow it (Don't do this)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment