Show launch failure reason in the splash
This commit is contained in:
parent
733843a6d4
commit
97bdb0d0cc
2 changed files with 47 additions and 17 deletions
|
|
@ -940,13 +940,26 @@ class DebugSession( object ):
|
|||
if 'name' not in launch_config:
|
||||
launch_config[ 'name' ] = 'test'
|
||||
|
||||
def failure_handler( reason, msg ):
|
||||
text = [
|
||||
'Launch Failed',
|
||||
'',
|
||||
reason,
|
||||
'',
|
||||
'Use :VimspectorReset to close'
|
||||
]
|
||||
self._splash_screen = utils.DisplaySplash( self._api_prefix,
|
||||
self._splash_screen,
|
||||
text )
|
||||
|
||||
|
||||
self._connection.DoRequest(
|
||||
lambda msg: self._OnLaunchComplete(),
|
||||
{
|
||||
'command': launch_config[ 'request' ],
|
||||
'arguments': launch_config
|
||||
}
|
||||
)
|
||||
},
|
||||
failure_handler )
|
||||
|
||||
|
||||
def _OnLaunchComplete( self ):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue