When I try to authenticate with an invalid user, that server returns "Stopping tcp: //127.0.0.1:49367 because Failed with SecurityException: User name [guest] or password is invalid.", The InternalReceiveINDY statement if Result.Command = 'ERROR' then, the error "Access violation at address ..." is generated, because Result is nil due to the try except that exists in
class function StompUtils.CreateFrameWithBuffer (Buf: string): IStompFrame;
try
...
except
on EStomp do
begin
// ignore it
Result: = nil;
end;
on e: Exception of
begin
Result: = nil;
raise EStomp.Create (e.Message);
end;
end;
Since it is possible to identify the problem due to the exception below
Debugger Exception Notification
Project Project1.exe raised exception class EStomp with message 'Connection Closed Gracefully.'.
Break Continue Help
could replace the code
if Result.Command = 'ERROR' then
raise EStomp.Create (FormatErrorFrame (Result));
per
if Assigned (Result) then
if Result.Command = 'ERROR' then
raise EStomp.Create (FormatErrorFrame (Result));
Hi @danieleteti,
When I try to authenticate with an invalid user, that server returns "Stopping tcp: //127.0.0.1:49367 because Failed with SecurityException: User name [guest] or password is invalid.", The InternalReceiveINDY statement if Result.Command = 'ERROR' then, the error "Access violation at address ..." is generated, because Result is nil due to the try except that exists in
class function StompUtils.CreateFrameWithBuffer (Buf: string): IStompFrame;
try ... except on EStomp do begin // ignore it Result: = nil; end; on e: Exception of begin Result: = nil; raise EStomp.Create (e.Message); end; end;
Since it is possible to identify the problem due to the exception below
Debugger Exception Notification
Project Project1.exe raised exception class EStomp with message 'Connection Closed Gracefully.'.
Break Continue Help
could replace the code
if Result.Command = 'ERROR' then raise EStomp.Create (FormatErrorFrame (Result));
per
if Assigned (Result) then if Result.Command = 'ERROR' then raise EStomp.Create (FormatErrorFrame (Result));
Thank you!