error function moved to logger
This commit is contained in:
parent
1884559125
commit
696076e131
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user