Ignore:
Timestamp:
Aug 21, 2008, 7:21:48 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

非同期入出力(Begin/End-Read/Writeメソッド)を実装。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/System/IO/Exception.ab

    r584 r605  
    6161    @brief  Windowsエラー値を基にIOExceptionを投げる。
    6262    @param[in] message  エラーメッセージ
     63    @param[in] error    エラーコード
    6364    @author Egtra
    6465    @date   2007/12/06
    6566    */
    6667    Sub ThrowWinIOException(msg As String, error As DWord)
    67         Throw New IOException(msg, HRESULT_FROM_WIN32(error))
     68        Throw GetWinIOException(msg, error)
    6869    End Sub
     70
     71    /*!
     72    @brief  Windowsエラー値を基にIOExceptionインスタンスを作成する。
     73    @param[in] message  エラーメッセージ
     74    @param[in] error    エラーコード
     75    @return 作成されたIOExceptionインスタンス
     76    @author Egtra
     77    @date   2008/08/21
     78    */
     79    Function GetWinIOException(msg As String, error As DWord) As IOException
     80        Return New IOException(msg, HRESULT_FROM_WIN32(error))
     81    End Function
    6982
    7083    /*!
     
    7487    @date   2007/12/06
    7588    */
    76     Sub ThrowWinLastErrorIOException(msg As String)
    77         Throw New IOException(msg, HRESULT_FROM_WIN32(GetLastError()))
     89    Sub ThrowWinLastErrorIOException(msg = Nothing As String)
     90        Throw GetWinLastErrorIOException(msg)
    7891    End Sub
     92
     93
     94    /*!
     95    @brief  GetLastError()の値を基にIOExceptionインスタンスを作成する。
     96    @param[in] message  エラーメッセージ
     97    @return 作成されたIOExceptionインスタンス
     98    @author Egtra
     99    @date   2008/08/21
     100    */
     101    Function GetWinLastErrorIOException(msg As String) As IOException
     102        Return New IOException(msg, HRESULT_FROM_WIN32(GetLastError()))
     103    End Function
    79104End Namespace
    80105
Note: See TracChangeset for help on using the changeset viewer.