mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 02:07:58 +08:00
Properly return ProcessExitedError upon process death
This commit is contained in:
@ -170,8 +170,12 @@ func (d *Debugger) Command(command *api.DebuggerCommand) (*api.DebuggerState, er
|
||||
log.Print("continuing")
|
||||
err = d.process.Continue()
|
||||
if err != nil {
|
||||
if _, exited := err.(proc.ProcessExitedError); exited {
|
||||
return d.State()
|
||||
if exitedErr, exited := err.(proc.ProcessExitedError); exited {
|
||||
state, err := d.State()
|
||||
if err != nil {
|
||||
return state, err
|
||||
}
|
||||
return state, exitedErr
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user