File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
scripts/pylib/twister/twisterlib Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 22#
33# Copyright (c) 2018-2022 Intel Corporation
44# SPDX-License-Identifier: Apache-2.0
5+ import logging
6+ import traceback
57
6- class TwisterException ( Exception ):
7- pass
8+ logger = logging . getLogger ( 'twister' )
9+ logger . setLevel ( logging . DEBUG )
810
11+ class TwisterException (Exception ):
12+ def __init__ (self , message = "TwisterException" ):
13+ super ().__init__ (message )
14+ for line in traceback .format_stack ():
15+ logger .info (line .strip ())
16+ logger .warning ("======call stack dump end============" )
917
1018class TwisterRuntimeError (TwisterException ):
1119 pass
1220
13-
1421class ConfigurationError (TwisterException ):
1522 def __init__ (self , cfile , message ):
1623 TwisterException .__init__ (self , str (cfile ) + ": " + message )
1724
18-
1925class BuildError (TwisterException ):
2026 pass
2127
22-
2328class ExecutionError (TwisterException ):
2429 pass
2530
26-
2731class StatusAttributeError (TwisterException ):
2832 def __init__ (self , cls : type , value ):
2933 msg = f'{ cls .__name__ } assigned status { value } , which could not be cast to a TwisterStatus.'
You can’t perform that action at this time.
0 commit comments