catch error messages before it reaches client

catch error messages before it reaches client

Hey, Skrol or anyone else who might know the answer :)

I'm making a custom ErrorHandler for my server, and I would like to also have a case for TBS, but I have yet to find any way to catch any error messages from TBS.
For instance, if there is a key missing in the data that was passed, I would like to catch that error and pass it to my ErrorHandler which will then process it and pass it on to the client.
Is this possible with TBS?

many thanks in advance!

By: Skrol29

Date: 2017-02-17

Time: 08:46

Re: catch error messages before it reaches client

Hi,

TBS has no common error handler for now because of history reasons.
BUt there a solution: if you set « TBS->SetOptions('noerr', true) », then no error message is displayed, the number of error is given by « $TBS->ErrCount » and the errors messages are given by « $TBS->ErrMsg ».
So you can check at the end of the merge if there is any error.

New message

Name:

Email:

ignore this line

Email:

-> No email accessible on Web pages.

Send replies notifications by email

Readers can contact you by Anti-Spam System (*)

Subject:

Message:

Special part in message: enter text between [code] and [/code] tags.

(*) Anti-Spam System: A reader can ask for 3 emails a day, no more ; and the reader must have a valid email to ask for emails.