Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to get error code from exception in c#

try {
	// some operation causing an exception
}
catch (SqlException e) {
	if (e.ErrorCode == 0x80131904)
      	// ...
		return null;
	throw;
}
 
PREVIOUS NEXT
Tagged: #error #code #exception
ADD COMMENT
Topic
Name
5+3 =