[docs]deflog(func):defwrapped(*args,**kwargs):try:logging.info("--- Entering: %s with parameters %s"%(func.__name__,args))try:returnfunc(*args,**kwargs)exceptExceptionase:logging.error('\n\n--- Exception in %s : %s\n\n'%(func.__name__,e))if"dsl"infunc.__globals__["__name__"]:raiseException(f"{e}\n\n"f"ImmuneMLParser: an error occurred during parsing in function {func.__name__} "f" with parameters: {args}.\n\nFor more details on how to write the specification, "f"see the documentation. For technical description of the error, see the log above.").with_traceback(e.__traceback__)else:raiseefinally:logging.info("--- Exiting: %s"%(func.__name__))returnwrapped