Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 2 Jahren, 5 Monaten
Letzter Beitrag:
vor 2 Jahren, 5 Monaten
Beteiligte Autoren:
KOZETA, Peter Holemans, Piet van Zanten

How to "catch" errors that are thrown by webdev application server

Startbeitrag von KOZETA am 09.06.2015 13:46

Hello,
I want to catch the errors that are thrown by webdev application server because I don't want my users to read something in a language they don't know (French or English).
I have managed to translate some of the errors, but they still have French/English titles.

Can anyone help me please?
Best regards,
Kozeta

Antworten:

Hi,

WHEN EXCEPTION ... DO ... END ... in the project init code and in all lower levels where you want to capture possible exceptions. This is similar to Try...Catch in Java.

If an exception isn't captured at the lower level, it will be forwarded to the higher level in the stack and the WHEN EXCEPTION statement over there if there is one. If none is found in the stack it will be the one you defined at the project (root) level in the project init code.

You can check my OO framework (WD19+WB19) on how to implemt this. You can download it at: http://repository.windev.com/resource.awp?file_id=91

Ciao,

Peter H.

von Peter Holemans - am 10.06.2015 09:12
Hi Kozeta,

You can translate a list of errors using the Remote Webdev Administrator.

Regards,
Piet

von Piet van Zanten - am 10.06.2015 12:14
Quote
Piet van Zanten
Hi Kozeta,

You can translate a list of errors using the Remote Webdev Administrator.

Regards,
Piet


Hi Piet,

Correct, Kozeta was talking about the WB Server exceptions while I was talking about the application exceptions...

One thing regarding translated WB server error messages: you'll have to do that again after every upgrade of the WebDev server version (e.g. V19 to V20). However you can ease this process a bit: since the WB server error messages are stored in the registry (when on a Windows Server) you can export the registry translated messages and import them again under the new WB version key after an upgrade.

Cheers,

Peter H.

von Peter Holemans - am 11.06.2015 08:13
Thanks Peter
Do you know the path where I can find the list of errors?

Because, like I said, from webdev application server you can only translate a part of the message (not the titles) and it looks ugly to the user.

von KOZETA - am 11.06.2015 13:23
Hi Kozeta,

If I recall correctly only customized error messages are written to the registry.
See WBAdmin server module->Tab Advanced->Button Errors->Custom label value...

On top you have an export button which will allow you to create a .reg file with the custom texts and settings...
In there you will see these values are written to [HKEY_LOCAL_MACHINE\Software\Wow6432Node\PC SOFT\WebDev\20.0] in case of WB20.

Cheers,

Peter H.

von Peter Holemans - am 11.06.2015 13:32
Thank you very much :)

von KOZETA - am 11.06.2015 14:09
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.