Introduced new exception class: `GDBCommandFailedError`
...that is raised from `GDBDebugger >> #send:andWait:` when
used synchronously (that is, when waiting for command result).
This allows senders to catch the command failures specifically.
"{ Package: 'jv:libgdbs' }"
"{ NameSpace: Smalltalk }"
GDBError subclass:#GDBCommandFailedError
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'GDB-Core-Exeptions'
!
!GDBCommandFailedError class methodsFor:'raising'!
raiseForResult: result
<resource: #skipInDebuggersWalkBack>
self newException
result: result;
raise.
"Created: / 13-09-2017 / 14:47:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBCommandFailedError methodsFor:'accessing'!
command
"Returns the command (as `GDBCommand`) that failed."
^ self result command
"Created: / 13-09-2017 / 14:40:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
result
"Returns the command result (as `GDBCommandResult`) for the failure"
^ self parameter
"Created: / 13-09-2017 / 14:41:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
result: aGDBCommandResult
parameter := aGDBCommandResult.
messageText := 'Command failed: ', (aGDBCommandResult propertyAt: 'msg').
"Created: / 13-09-2017 / 14:48:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !