Changeset 410 for trunk/Include


Ignore:
Timestamp:
Feb 23, 2008, 3:02:47 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

KeyNotFoundExceptionを実装

Location:
trunk/Include/Classes/System/Collections/Generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/Collections/Generic/Dictionary.ab

    r403 r410  
    4141    Virtual Function Item(key As Key) As T
    4242        If Object.ReferenceEquals(key, Nothing) Then
    43             'Throw ArgumentNullError
    44             debug
    45             Exit Function
     43            Throw New ArgumentNullException("key")
    4644        End If
    4745
     
    6058
    6159        Throw New KeyNotFoundException
    62 
    63         Return Nothing
    6460    End Function
    6561
  • trunk/Include/Classes/System/Collections/Generic/KeyNotFoundException.ab

    r403 r410  
     1'System/Collections/Generic/KeyNotFoundException.ab
     2
    13Namespace System
    24Namespace Collections
     
    68Class KeyNotFoundException
    79    Inherits System.SystemException
     10Public
     11    /*!
     12    @biref  コンストラクタ
     13    */
     14    Sub KeyNotFoundException()
     15        SystemException(GetType().FullName, Nothing)
     16        HResult = ActiveBasic.AB_E_KEYNOTFOUND
     17    End Sub
     18    /*!
     19    @biref  コンストラクタ
     20    @param[in] message  エラーメッセージ
     21    */
     22    Sub KeyNotFoundException(message As String)
     23        SystemException(message, Nothing)
     24        HResult = ActiveBasic.AB_E_KEYNOTFOUND
     25    End Sub
     26    /*!
     27    @biref  コンストラクタ
     28    @param[in] message  エラーメッセージ
     29    @param[in] innerException   内部例外
     30    */
     31    Sub KeyNotFoundException(message As String, innerException As Exception)
     32        SystemException(message, innerException)
     33        HResult = ActiveBasic.AB_E_KEYNOTFOUND
     34    End Sub
    835End Class
    936
Note: See TracChangeset for help on using the changeset viewer.