[fpc-pascal] Typo in the implementation 'TAssert.AssertException(AExceptionClass, AMethod, AExceptionMessage, AExceptionContext)'

silvioprog silvioprog at gmail.com
Sun Apr 5 21:38:20 CEST 2015


Hello,

Aprogrammer could use:

  AssertException(EMyException, @MyException, 'My exception');

But the current implementation in this method is:

class procedure TAssert.AssertException(AExceptionClass: ExceptClass;
  AMethod: TRunMethod;AExceptionMessage : String = ''; AExceptionContext :
Integer = 0);
begin
  AssertException('', AExceptionClass, AMethod,'',0,CallerAddr);
end;

To fix this problem, it could be:

class procedure TAssert.AssertException(AExceptionClass: ExceptClass;
  AMethod: TRunMethod;AExceptionMessage : String = ''; AExceptionContext :
Integer = 0);
begin
  AssertException('', AExceptionClass, AMethod, AExceptionMessage, 0,
CallerAddr);
end;

Issue: http://bugs.freepascal.org/view.php?id=27789

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150405/61fb9c82/attachment.html>


More information about the fpc-pascal mailing list