class_docstr: lazily provides Exception classes for each possible POSIX errno
  (as defined per the 'errno' module).  All such instances
  subclass EnvironmentError.
class_docstr_tok: ["lazily","provides","Exception","classes","for","each","possible","POSIX","errno","(","as","defined","per","the","'errno","'","module",")",".","All","such","instances","subclass","EnvironmentError","."]
docstr: call a function and raise an errno-exception if applicable. 
docstr_tok: ["call","a","function","and","raise","an","errno-exception","if","applicable","."]
code: def checked_call(self, func, *args, **kwargs):
      """call a function and raise an errno-exception if applicable."""
      __tracebackhide__ = True
      try:
          return func(*args, **kwargs)
      except self.Error:
          raise
      except (OSError, EnvironmentError):
          cls, value, tb = sys.exc_info()
          if not hasattr(value, "errno"):
              raise
          __tracebackhide__ = False
          errno = value.errno
          try:
              if not isinstance(value, WindowsError):
                  raise NameError
          except NameError:
              # we are not on Windows, or we got a proper OSError
              cls = self._geterrnoclass(errno)
          else:
              try:
                  cls = self._geterrnoclass(_winerrnomap[errno])
              except KeyError:
                  raise value
          raise cls("%s%r" % (func.__name__, args))
          __tracebackhide__ = True
  
file_path: catboost/contrib/python/py/py2/py/_error.py
imports: from types import ModuleType
  import sys, os, errno
label_desc: Use image node_id 3 for calling the ErrorMaker obj's underlying member method code with example usage: obj.checked_call(func) and returns: func