error function moved to logger

This commit is contained in:
Lukas Klass 2020-05-29 09:34:56 +02:00
parent 1884559125
commit 696076e131

View File

@ -1,6 +1,3 @@
import logging
import sys
import traceback
import numpy as np
from astropy.io import ascii
from astropy.table import Table
@ -8,27 +5,6 @@ import astropy.units as u
import re
def error(msg: str, exit_: bool = True):
"""
Handle errors
Parameters
----------
msg : str
Error message to show
exit_ : bool
Exit program
Returns
-------
"""
logging.error(msg)
if exit_:
traceback.print_stack()
sys.exit(1)
def isLambda(obj: object):
"""
Check if a object is of type lambda