How to show long error messages?

Discussions about CSEntry
Post Reply
Guest

How to show long error messages?

Post by Guest »

Sometimes our error messages are too long. It’s not convenient to see them at the screen in Logic window. How can we cut it to several lines?

The second question is how to divide this message to show in CSEntry application? Is there any sign to use it for dividing our messages into several lines?
Gregory Martin
Posts: 1792
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: How to show long error messages?

Post by Gregory Martin »

To cut messages across several lines in your logic file, you can use the concat function like this:
errmsg(concat(  "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                
"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"));
The concat function will join all the strings you pass it into one large string. Here's another example:
errmsg(concat(  "Some text...",
                
"more text...",
                
"a numeric parameter: %d...",
                
"more text"),
                
500);
To break messages across lines of data, use the \n character. For example:
errmsg("First line\nSecond Line");
This only works in operator-controlled mode, however, so if you're using system-controlled mode, you'll have to temporarily switch to operator-controlled mode. For example:
set errmsg(operator);
errmsg("First line\nSecond Line");
set errmsg(default);


Last bumped by Anonymous on April 5th, 2012, 2:45 am.
Post Reply