Source code for mangadap.util.exception_tools

# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-

Provides a set of tools that the MaNGA DAP uses to handle/report raised


.. include license and copyright
.. include:: ../include/copy.rst


.. include common links, assuming primary doc root is up one directory
.. include:: ../include/links.rst
import inspect
import os

[docs]def check_environment_variable(name): """ Check for the existence of an environment variable. Args: name (:obj:`str`): Name of a required environmental variable Raises: EnvironmentError: Raised if *name* is not defined. """ if name not in os.environ: raise EnvironmentError('{0} not defined in current environment!')