- edited description
Project maintenance: ensure all error codes are available at one place
Issue #23
resolved
So, instead of doing this:
throw new SomethingException("INVALID_STUDENT_ID");
we should be doing this:
throw new SomethingException(ErrorCodes.INVALID_STUDENT_ID);
with the class ErrorCodes defined like this:
class ErrorCodes
{
public const string INVALID_STUDENT_ID = "INVALID_STUDENT_ID";
// Etc., put other error codes in here as well...
}
This ensures that we reuse codes as much as possible.
Comments (2)
-
Account Deactivated reporter -
Account Deactivated reporter - changed status to resolved
Completed in PR 157
- Log in to comment