parameters: (self)
docstring: Search for unsupported use of exception variables.
          Note, they cannot be stored into user variable.
docstring_summary: Search for unsupported use of exception variables.
          Note, they cannot be stored into user variable.
docstring_tokens: Search for unsupported use of exception variables . Note they cannot be stored into user variable .
function: def _legalize_exception_vars(self):
          """Search for unsupported use of exception variables.
          Note, they cannot be stored into user variable.
          """
          # Build a set of exception variables
          excvars = self._exception_vars.copy()
          # Propagate the exception variables to LHS of assignment
          for varname, defnvars in self.definitions.items():
              for v in defnvars:
                  if isinstance(v, ir.Var):
                      k = v.name
                      if k in excvars:
                          excvars.add(varname)
          # Filter out the user variables.
          uservar = list(filter(lambda x: not x.startswith('$'), excvars))
          if uservar:
              # Complain about the first user-variable storing an exception
              first = uservar[0]
              loc = self.current_scope.get(first).loc
              msg = "Exception object cannot be stored into variable ({})."
              raise errors.UnsupportedError(msg.format(first), loc=loc)
function_tokens: def _legalize_exception_vars ( self ) : # Build a set of exception variables excvars = self . _exception_vars . copy ( ) # Propagate the exception variables to LHS of assignment for varname , defnvars in self . definitions . items ( ) : for v in defnvars : if isinstance ( v , ir . Var ) : k = v . name if k in excvars : excvars . add ( varname ) # Filter out the user variables. uservar = list ( filter ( lambda x : not x . startswith ( '$' ) , excvars ) ) if uservar : # Complain about the first user-variable storing an exception first = uservar [ 0 ] loc = self . current_scope . get ( first ) . loc msg = "Exception object cannot be stored into variable ({})." raise errors . UnsupportedError ( msg . format ( first ) , loc = loc )