Ignore:
Timestamp:
Nov 10, 2007, 11:20:01 AM (17 years ago)
Author:
dai
Message:

例外処理機構実装中
・Catchのオーバーロードに対応
・Finallyに対応
・Tryスコープの入れ子に対応
(※注意 … 現時点ではThrow→Catch間でパラメータの引渡しができません)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/Threading/Thread.ab

    r330 r374  
    2828    name As String
    2929
     30    isThrowing As Boolean
     31    throwingParamObject As Object
     32
    3033Public
    3134    Sub Thread()
     
    3740
    3841        name = "sub thread"
     42
     43        isThrowing = False
     44        throwingParamObject = Nothing
    3945    End Sub
    4046    Sub Thread(fp As PTHREAD_START_ROUTINE, args As VoidPtr)
     
    4753
    4854        name = "sub thread"
     55
     56        isThrowing = False
     57        throwingParamObject = Nothing
    4958    End Sub
    5059
     
    5766
    5867        name = "sub thread"
     68
     69        isThrowing = False
     70        throwingParamObject = Nothing
    5971    End Sub
    6072
     
    6476
    6577        name = "sub thread"
     78
     79        isThrowing = False
     80        throwingParamObject = Nothing
    6681    End Sub
    6782
     
    163178    Function __SetContext(ByRef Context As CONTEXT) As BOOL
    164179        Return SetThreadContext(m_hThread,Context)
     180    End Function
     181
     182    Sub __Throw( ex As Object )
     183        isThrowing = True
     184        throwingParamObject = ex
     185    End Sub
     186    Sub __Catched()
     187        isThrowing = False
     188        throwingParamObject = Nothing
     189    End Sub
     190    Function __IsThrowing() As Boolean
     191        Return isThrowing
     192    End Function
     193    Function __GetThrowintParamObject() As Object
     194        Return throwingParamObject
    165195    End Function
    166196
Note: See TracChangeset for help on using the changeset viewer.