PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → How to "catch" errors that are thrown by webdev application server
How to "catch" errors that are thrown by webdev application server
Iniciado por guest, 09,jun. 2015 15:46 - 6 respuestas
Publicado el 09,junio 2015 - 15: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
Publicado el 10,junio 2015 - 11:12
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…

Ciao,

Peter? H.
Publicado el 10,junio 2015 - 14:14
Hi Kozeta,

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

Regards,
Piet
Publicado el 11,junio 2015 - 10:13
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.
Publicado el 11,junio 2015 - 15:23
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.
Publicado el 11,junio 2015 - 15:32
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.
Publicado el 11,junio 2015 - 16:09
Thank you very much :)