Closed Safrad closed 5 years ago
SNegativeRadicand contains "%s", so replace raise EInvalidArgument.Create(SNegativeRadicand); with raise EInvalidArgument.CreateFmt(SNegativeRadicand, ErrorInfo); in class procedure BigInteger.Error(ErrorCode: TErrorCode; const ErrorInfo: array of const); begin case ErrorCode of ecParse: raise EConvertError.CreateFmt(SErrorParsingFmt, ErrorInfo); ecDivbyZero: raise EZeroDivide.Create(SDivisionByZero); ecConversion: raise EConvertError.CreateFmt(SConversionFailedFmt, ErrorInfo); ecOverflow: raise EOverflow.Create(SOverflow); ecInvalidArgFloat: raise EInvalidArgument.CreateFmt(SInvalidArgumentFloatFmt, ErrorInfo); ecInvalidBase: raise EInvalidArgument.Create(SInvalidArgumentBase); ecInvalidArg: raise EInvalidArgument.CreateFmt(SInvalidArgumentFmt, ErrorInfo); ecNoInverse: raise EInvalidArgument.Create(SNoInverse); ecNegativeExponent: raise EInvalidArgument.CreateFmt(SNegativeExponent, ErrorInfo); ecNegativeRadicand: raise EInvalidArgument.Create(SNegativeRadicand); else raise EInvalidOp.Create(SInvalidOperation); end; end;
Solved with raise EInvalidAgument.CreateFmt(SNegativeRadicand, ErrorInfo)
SNegativeRadicand contains "%s", so replace raise EInvalidArgument.Create(SNegativeRadicand); with raise EInvalidArgument.CreateFmt(SNegativeRadicand, ErrorInfo); in class procedure BigInteger.Error(ErrorCode: TErrorCode; const ErrorInfo: array of const); begin case ErrorCode of ecParse: raise EConvertError.CreateFmt(SErrorParsingFmt, ErrorInfo); ecDivbyZero: raise EZeroDivide.Create(SDivisionByZero); ecConversion: raise EConvertError.CreateFmt(SConversionFailedFmt, ErrorInfo); ecOverflow: raise EOverflow.Create(SOverflow); ecInvalidArgFloat: raise EInvalidArgument.CreateFmt(SInvalidArgumentFloatFmt, ErrorInfo); ecInvalidBase: raise EInvalidArgument.Create(SInvalidArgumentBase); ecInvalidArg: raise EInvalidArgument.CreateFmt(SInvalidArgumentFmt, ErrorInfo); ecNoInverse: raise EInvalidArgument.Create(SNoInverse); ecNegativeExponent: raise EInvalidArgument.CreateFmt(SNegativeExponent, ErrorInfo); ecNegativeRadicand: raise EInvalidArgument.Create(SNegativeRadicand); else raise EInvalidOp.Create(SInvalidOperation); end; end;