Possible bug in TROMessage?

(landrix) #1

i extended
RemObjects SDK for Delphi\Session Types (CodeFirst)
with following event

procedure TSessionTypes_ClientMainForm.ROBINMessageServerException(
anException: Exception; var RaiseException: Boolean);
RaiseException := false;

click “Get Session Manager Name” without login for a exeption and it will raise

‘Error reading parameter Result: Stream-Lesefehler’. Prozess SessionTypes_Client.exe (17140)

(EvgenyK) #2

this event is designed for logging or replacing std exception with your own.
Exception should be raised here anyway - standard or your own.

(landrix) #3

where is the right place to catch a SessionNotFoundException in silent manner and force a user login?

(EvgenyK) #4

Channel.OnLoginNeeded event.

for Session Types sample, it could be something like

procedure TClientDataModule.ChannelLoginNeeded(Sender: TROTransportChannel;
  anException: Exception; var aRetry: Boolean);
  aRetry := FLoginService.Login(cbUserID.Text, ePassword.Text);

Note: In debugger, you will still see SessionNotFoundException but it will be handled later in this event.

Select user in combobox so user/pass will be filled and click “Get Session Manager Name”