Returns the error stored in the library.
If no error, return I_CAL_NO_ERROR.
Return the error happened