Catch adapter being None and print user-friendly message:
This commit is contained in:
parent
cd26e81fd9
commit
1b7402915c
2 changed files with 12 additions and 2 deletions
|
|
@ -136,7 +136,17 @@ class DebugSession( object ):
|
|||
configuration = configurations[ configuration_name ]
|
||||
adapter = configuration.get( 'adapter' )
|
||||
if isinstance( adapter, str ):
|
||||
adapter = adapters.get( adapter )
|
||||
adapter_dict = adapters.get( adapter )
|
||||
|
||||
if adapter_dict is None:
|
||||
utils.UserMessage( f"The specified adapter '{adapter}' is not "
|
||||
"available. Did you forget to run "
|
||||
"'install_gadget.py'?",
|
||||
persist = True,
|
||||
error = True )
|
||||
return
|
||||
|
||||
adapter = adapter_dict
|
||||
|
||||
# TODO: Do we want some form of persistence ? e.g. self._staticVariables,
|
||||
# set from an api call like SetLaunchParam( 'var', 'value' ), perhaps also a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue