/*! @file @brief System.IOに属す例外クラスの定義 */ Namespace ActiveBasic Const AB_E_IO = &h80041620 '80131620 End Namespace Namespace System Namespace IO /*! @brief IO処理に関する例外のクラス @author Egtra @date 2007/12/06 */ Class IOException Inherits SystemException Public /*! @biref コンストラクタ */ Sub IOException() Exception(GetType().FullName, Nothing) HResult = ActiveBasic.AB_E_IO End Sub /*! @biref コンストラクタ @param[in] message エラーメッセージ */ Sub IOException(message As String) Exception(message, Nothing) HResult = ActiveBasic.AB_E_IO End Sub /*! @biref コンストラクタ @param[in] message エラーメッセージ @param[in] innerException 内部例外 */ Sub IOException(message As String, innerException As Exception) Exception(message, innerException) HResult = ActiveBasic.AB_E_IO End Sub /*! @biref コンストラクタ @param[in] message エラーメッセージ @param[in] hr HRESULT例外値 */ Sub IOException(message As String, hr As HRESULT) Exception(message, Nothing) HResult = hr End Sub End Class Namespace Detail /*! @brief Windowsエラー値を基にIOExceptionを投げる。 @param[in] message エラーメッセージ @author Egtra @date 2007/12/06 */ Sub ThrowWinIOException(msg As String, error As DWord) ' Throw IOException(msg, HRESULT_FROM_WIN32(error)) End Sub /*! @brief GetLastError()の値を基にIOExceptionを投げる。 @param[in] message エラーメッセージ @author Egtra @date 2007/12/06 */ Sub ThrowWinLastErrorIOException(msg As String) ' Throw IOException(msg, HRESULT_FROM_WIN32(GetLastError())) End Sub End Namespace End Namespace 'IO End Namespace 'System