NetTalk Central

Author Topic: Suppressing messages  (Read 3311 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Suppressing messages
« on: May 16, 2013, 02:35:44 AM »
Hi,

I have an app that uses NTWS which can either be run as a desktop app or as a service. How do I ensure that any error in the web server does not get displayed in a message (like Network Communication Error), but rather supplies an embed or class method to trap the error? In the app I checked "Suppress Error Messages" on the NetSimple Object template extension in the WebHandler procedure. There isn't another option available for this.

Thys

Poul

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Suppressing messages
« Reply #1 on: May 16, 2013, 05:06:26 AM »
i think of  "Suppress Error Messages"   as nettalks own 'simple' debugging device and not  really for what we think of as messages,
these are messages under nettalks control, You are speaking of messages from other parts of clarion.

messages from things like abc and system messagaes need to be avoided/intercepted - see prop:messagehook.to roll-your own.
To save time and effort i use Capesoft's Messagebox template.  it can  hook all the messages (from message, halt and stop).

That will work for any message generated from your clarion app.

What i do for any web/service type app,is set a global default to hook all messages to automatically clear after a few  seconds,
and to log all messages to a UILogfile.log.  Which when i am developing or running in application mode, is good enuff
for debugging interactively, But for services where messages are hidden or the server is not accessible to user, the messages clear automatically
and  i have a record of  events that may need to addressed without the app freezing.

the goal for a service app is to have NO messages, however i tend to let messages flow,i will add in extra messages to document
some unexpected/ unusual occurence, the effect on users is slowing down by the length of time the messagebox takes to automatically clear
but i end up with a definitive log of what happened and when.  (if and when  i address the issue, the app also appears to speed up!)

poul





Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Suppressing messages
« Reply #2 on: May 17, 2013, 07:25:45 AM »
>>  In the app I checked "Suppress Error Messages" on the NetSimple Object template extension in the WebHandler procedure.

Better to tick in on in WebServer procedure.

Cheers
Bruce

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: Suppressing messages
« Reply #3 on: May 19, 2013, 09:50:39 AM »
Hi,

Using 6.51.

I checked and the Suppress Error Messages check in the WebServer procedure was also on, so the Network Communication Slipped through even with all checks on.

But I understand that other parts of the Clarion program may also produce visible messages. Hence I will add code to set the message hook property to a logger function.

Thanks,
Thys

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: Suppressing messages
« Reply #4 on: May 19, 2013, 10:10:20 AM »
Ok, did it - works fine.

Thanks again.