Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-04

Typo in the implementation 'TAssert.AssertException(AExceptionClass, AMethod, AExceptionMessage, AExceptionContext)'

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

silvioprog

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
Michael Van Canneyt
to silvioprog

Fixed. Thanks for spotting this !

Michael.

silvioprog wrote 31 lines
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