private static string GetErrorMessage(RecognitionExceptionType type) { string message = string.Empty; switch (type) { case RecognitionExceptionType.SCREEN_IMAEG_IS_SMALLER_THAN_TARGET_IMAGE: message = "ScreenImage is smaller than TargetImage, ScreenImage is must bigger than TargetImage."; break; default: message = "This exception is not expected."; break; } return(message); }
public RecognitionException(RecognitionExceptionType type) : base(GetErrorMessage(type)) { ErrorType = type; }