/*
This software is subject to the license described in the License.txt file
included with this software distribution. You may not use this file except
in compliance with this license.
Copyright (c) Dynastream Innovations Inc. 2016
All rights reserved.
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace ANT_Managed_Library.ANTFS
{
///
/// Exceptions thrown by ANT-FS objects
///
public class ANTFS_Exception : ANT_Exception
{
///
/// Constructor
///
/// String to append to exception message
internal ANTFS_Exception(String exceptionDetail) : base("ANTFS - " + exceptionDetail) { }
///
/// Prefixes given string with "ANTLibrary Exception: " and propagates inner exception
///
/// String to prefix
/// Inner exception
internal ANTFS_Exception(String exceptionDetail, Exception innerException) : base("ANTFS - " + exceptionDetail, innerException) { }
}
///
/// Exceptions thrown by ANT-FS objects when a request to perform a specific operation failed
/// Developers must ensure that these exceptions are handled appropiately to continue with the program execution
///
public class ANTFS_RequestFailed_Exception : ANTFS_Exception
{
///
/// Constructor
///
/// Requested operation that failed
/// ANT-FS Library return code
internal ANTFS_RequestFailed_Exception(string strOperation, ReturnCode theReturn) : base(strOperation + " Request Failed: " + Print.AsString(theReturn)) { }
///
/// Constructor
///
/// Requested operation that failed
internal ANTFS_RequestFailed_Exception(string exceptionDetail) : base(exceptionDetail) { }
}
}