Error-Handling ?

gadrecsgadrecs Member Posts: 10
Hi all,

is there a tool or a way, which helps me come around the following problem:

We have a scheduler running, doing several jobs over the day.
Sometimes, to reasons we are still investigating, the Nav-Client runs into errors and remains in a state, where no further schedules can be executed.
E.g. when the client looses connectivity to the SQL-Server and so on. Today it was an object that was out of date and ran into failures.
Now is there a chance of "recording" what error occured and writing this into a txt-file
There is a tool running locally on the client, that restarts the finsql.exe 2 times a day to "restart" the scheduler cleanly, but of course when you kill the finsql.exe the hard way, all errors you might have had on the screen are lost. And of course, most of the times the errors happen on holidays or in the night, when noone is in the office having an eye on that PC.

Does anybody have an idea , what we maybe could do here, to find out what happened, AFTER the failure ?

Kind regards,

Markus

Comments

  • ChinmoyChinmoy Member Posts: 359
    Did you go through the following post?

    viewtopic.php?f=23&t=25993&hilit=write+to+event+log
  • gadrecsgadrecs Member Posts: 10
    Dear Chimnoy, thanks for the reply ...

    Thats interresting ... but not exactly what im lookking for.
    What i would need (in short) is that all error (especially text that is displayed in the Error-Windows) beeing mirrored or redirected to a text-file Like an error-log or so ...

    So whenever an error occurs and a window pops up the Text that is displayed in this window (normally those annoying ones with only the "OK" Button...) is also written to a file.

    Kind regards,

    Markus
  • vaprogvaprog Member Posts: 1,141
    You cannot do this using the GUI client.

    You get this for free using NAS.
  • DakkonDakkon Member Posts: 192
    As vaprog indicated, it would be better to run such a thing under a NAS. I would always recommend running some sort of scheduling routine under a NAS. That way, you get the benefits that come along with a windows service (automatic startup, recovery on crash, etc). Within C/AL, don't forget that you can also retrieve the value of any error message you trap. I wrote a custom scheduling engine for my employer that runs every scheduled task within a "IF CODEUNIT.RUN(...) THEN" call to trap any errors and then retrieves the error message using the GETLASTERRORTEXT function in C/AL so that it can be logged as we choose. It does much more than that, but if you just need to catch and react to error messages in some way, it is relatively easy to do with a bit of code.
    Thad Ryker
    I traded my sanity for a railgun :mrgreen:
Sign In or Register to comment.