Skip to content

Instantly share code, notes, and snippets.

Created September 7, 2019 17:01
What would you like to do?
try {
} catch (InvalidOperationException ex) {
if (ex.Message.StartsWith("Cannot access the")) {
// Some specialized handling logic
} else {
throw; // The ex is implicit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment