Example #1
0
 /// <summary>
 /// Handles the exception. Throws an exception based on the error.
 /// </summary>
 /// <param name="error">The error to check.</param>
 /// <param name="methodName">Method name</param>
 private void handleException(ASIOError error, String methodName)
 {
     if (error != ASIOError.ASE_OK && error != ASIOError.ASE_SUCCESS)
     {
         ASIOException asioException = new ASIOException(String.Format("Error code [{0}] while calling ASIO method <{1}>, {2}", ASIOException.getErrorName(error), methodName, this.getErrorMessage()));
         asioException.Error = error;
         throw asioException;
     }
 }
Example #2
0
 public AsioException(ASIOError Error) : base(String.Format("Error in ASIO object: {0}", Error))
 {
     error = Error;
 }
 /// <summary>
 /// Gets the name of the error.
 /// </summary>
 /// <param name="error">The error.</param>
 /// <returns>the name of the error</returns>
 static public String getErrorName(ASIOError error)
 {
     return Enum.GetName(typeof(ASIOError), error);            
 }
Example #4
0
 /// <summary>
 /// Gets the name of the error.
 /// </summary>
 /// <param name="error">The error.</param>
 /// <returns>the name of the error</returns>
 static public String getErrorName(ASIOError error)
 {
     return(Enum.GetName(typeof(ASIOError), error));
 }
Example #5
0
 private static void Try(ASIOError Result)
 {
     if (Result != ASIOError.OK && Result != ASIOError.SUCCESS)
         throw new AsioException(Result);
 }
Example #6
0
 public AsioException(string Message, ASIOError Error)
     : base(Message)
 {
     error = Error;
 }
Example #7
0
 public AsioException(ASIOError Error)
     : base(String.Format("Error in ASIO object: {0}", Error))
 {
     error = Error;
 }
Example #8
0
 public AsioException(string Message, ASIOError Error) : base(Message)
 {
     error = Error;
 }