Check if called agent generated an error

Can someone tell me how I can check if a called agent (agent.run) generated an error or not?

I’ve tried

 If agent.Run <> 0 Then

but it always returns 0 if the agent is started.

I have no errorhandling in my called agent and I would like to check when the called agent had an error.

Thx!

Subject: Try log.nsf > Miscellaneous Events

If no error message shows up there, you’ll have to add your own error handler to the agent.

Subject: I need life error handling

Hi,

Thanks for your responses. Both are not usable.

I want to pass an error generated in the called agent life to the calling agent so I can continue in the calling agent with that information. The calling agent must not stop, but continue using an If-condition.

If Then

'do this

Else

'do other things

End If

Subject: add error handler

I think you answered your own question, add an error handling routine in your called agent so it prints the error to the server log.