Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 8 Monaten
Letzter Beitrag:
vor 8 Monaten
Beteiligte Autoren:
JP, Peter Holemans

[WD21] - Error Trapping

Startbeitrag von JP am 19.09.2017 09:17

Hi All

What is the easiest way to implement a single appplication wide error trapping routine? i.e. once the app starts I would like any error at all to be sent to a single error trapping routine which will log the error, inform the user of actions to be taken, and then probably exit the application in an orderly fashion.

TIA

Antworten:

Hi JP,

What you are talking about is Exception handling (i.e. a fatal system/program error).

Error handling on the other hand refers usually more to (business) process related errors making it impossible to complete a certain process.
Of course error handling could also be related to an access to a computer resource (lan, wan, nas, db connection, ...) aside of the pure business process and its rules making use of it.

My OOP project posted on the WX repository shows a possible methodology on how you could implement this:
- Exception handling and logging directed to a global method at the (singleton) application class from any WHEN EXCEPTION...DO block
- Error handling and messaging (Info, warning and error levels)

All should be there and work out of the box after simple integration into your project (although it is no longer maintained as I'm moving completely to .net core)...

There's also a pdf in the zip file (and maybe still a video somewhere) explaining how all the pieces work together and how you can implement them in your project.

The download is OOP Framework (Incl Error handling classes)

Best regards,

Peter

von Peter Holemans - am 19.09.2017 10:12
Peter,

Thanks. WIll have a look.

von JP - am 19.09.2017 10:30
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.