private Exception CheckError(MH_STATUS status, bool throwOnError = true)
    {
        if (status == MH_STATUS.MH_OK)
        {
            return(null);
        }
        var ex = new Exception(status.ToString());

        if (throwOnError)
        {
            throw ex;
        }
        return(ex);
    }
Esempio n. 2
0
        private TimeTravelerException CheckError(MH_STATUS status, bool throwOnError = true, [CallerMemberName] string methodName = null)
        {
            if (status == MH_STATUS.MH_OK)
            {
                return(null);
            }

            var ex = new TimeTravelerException(status.ToString());

            if (throwOnError)
            {
                throw ex;
            }

            return(ex);
        }