<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def spiceErrorCheck(f):
 """ Decorator for spiceypy hooking into spice error system. If an error is detected, an output similar to outmsg :type f: builtins.function :return: :rtype: """


    @functools.wraps(f)
    def with_errcheck(*args, **kwargs):
        try:
            res = f(*args, **kwargs)
            checkForSpiceError(f)
            return res
        except:
            raise

    return with_errcheck