--- a/GDBDebugger.st Thu Jul 06 07:54:57 2017 +0200
+++ b/GDBDebugger.st Tue Jul 11 23:37:04 2017 +0200
@@ -138,6 +138,9 @@
command to finish and return the command result.
Otherwise, return nil immediately.
+ If `wait` is true and if command results in an error GDBError
+ is thrown.
+
`command` may be either a GDBCommand or string, in which case it will
be parsed into a GDBCommand.
"
@@ -169,7 +172,14 @@
connection eventAnnouncer when:GDBCommandResultEvent do:handler1.
connection pushEvent:(GDBCommandEvent new command:cmd).
blocker wait.
+ result isError ifTrue:[
+ GDBError newException
+ parameter: result;
+ messageText: 'Command failed: ', (result propertyAt: 'msg');
+ raise.
+ ].
result.
+
]
ifFalse:[
connection pushEvent:(GDBCommandEvent new command:cmd).
@@ -177,7 +187,7 @@
]
"Created: / 02-06-2014 / 23:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 08-03-2015 / 05:51:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 11-07-2017 / 21:14:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
send:command andWaitFor:eventHandlers