Object.st
changeset 23661 d1f55e676ed5
parent 23659 2a7cd86b3931
child 23716 bd9d42709b9b
equal deleted inserted replaced
23660:9e1d9ddc5934 23661:d1f55e676ed5
  5323 
  5323 
  5324      Currently, this is used to map XErrors to smalltalk errors, but can be
  5324      Currently, this is used to map XErrors to smalltalk errors, but can be
  5325      used from other C subsystems too, to upcast errors.
  5325      used from other C subsystems too, to upcast errors.
  5326      Especially, for subsystems which call errorHandler functions asynchronously.
  5326      Especially, for subsystems which call errorHandler functions asynchronously.
  5327      IDs (currently) used:
  5327      IDs (currently) used:
  5328 	#DisplayError ..... x-error interrupt
  5328         #DisplayError ..... x-error interrupt
  5329 	#XtError      ..... xt-error interrupt (Xt interface is not yet published)
  5329         #XtError      ..... xt-error interrupt (Xt interface is not yet published)
  5330     "
  5330     "
  5331 
  5331 
  5332     |handlers handler|
  5332     |handlers handler|
  5333 
  5333 
  5334     handlers := ObjectMemory registeredErrorInterruptHandlers.
  5334     handlers := ObjectMemory registeredErrorInterruptHandlers.
  5335     handlers notNil ifTrue:[
  5335     handlers notNil ifTrue:[
  5336 	handler := handlers at:errorID ifAbsent:nil.
  5336         handler := handlers at:errorID ifAbsent:nil.
  5337 	handler notNil ifTrue:[
  5337         handler notNil ifTrue:[
  5338 	    "/
  5338             "/
  5339 	    "/ handler found; let it do whatever it wants ...
  5339             "/ handler found; let it do whatever it wants ...
  5340 	    "/
  5340             "/
  5341 	    handler errorInterrupt:errorID with:aParameter.
  5341             handler errorInterrupt:errorID with:aParameter.
  5342 	    ^ self
  5342             ^ self
  5343 	].
  5343         ].
  5344     ].
  5344     ].
  5345 
  5345 
  5346     "/
  5346     "/
  5347     "/ no handler - raise errorSignal passing the errorId as parameter
  5347     "/ no handler - raise errorSignal passing the errorId as parameter
  5348     "/
  5348     "/
  5349     ^ Error
  5349     ^ ProceedableError
  5350 	raiseRequestWith:errorID
  5350         raiseRequestWith:errorID
  5351 	errorString:('Subsystem error. ErrorID = ' , errorID printString)
  5351         errorString:('Subsystem error. ErrorID = ' , errorID printString)
       
  5352 
       
  5353     "Modified: / 04-02-2019 / 15:23:19 / Stefan Vogel"
  5352 !
  5354 !
  5353 
  5355 
  5354 exceptionInterrupt
  5356 exceptionInterrupt
  5355     "{ Pragma: +optSpace }"
  5357     "{ Pragma: +optSpace }"
  5356 
  5358