<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def FMErrorByNum( num ):
 """This function raises an error based on the specified error code."""


    if not num in FMErrorNum.keys():
        raise FMServerError, (num, FMErrorNum[-1])
    elif num == 102:
        raise FMFieldError, (num, FMErrorNum[num])
    else:
        raise FMServerError, (num, FMErrorNum[num])