1. crash feature request

Rob,

I was trying to get a program to generate ex.err AND suppress the message on the
screen. It doesn't seem to be possible.

The ref manual says this:

for crash_file():
<quote>
s may be empty, i.e. "". In this case no diagnostics or debugging information
will be written to either a file or the screen. s might also be "NUL" or
"/dev/null", in which case diagnostics will be written to the screen, but the
ex.err information will be discarded.
</quote>

And for crash_message():
<quote>
By calling crash_message() you can control the message that will appear on the
screen. Debugging information will still be stored in ex.err. You won't lose any
information by doing this.

s may contain '\n', new-line characters, so your message can span several lines
on the screen. Euphoria will switch to the top of a clear text-mode screen before
printing your message.
</quote>

My proposal is: since you can call crash_file("") to suppress ex.err, do you
think you could make it so that crash_message("") will just suppress the message
on the screen? That way the error file can still be generated, but then the
program will just end without making a console window appear.

I think this would be a useful option for programs that are intended to be
background services that are never supposed to put anything on the screen.

What do you think about it, Rob?

Ryan W. Johnson

Fluid Application Environment
http://www.fluidae.com/

[cool quote here, if i ever think of one...]

new topic     » topic index » view message » categorize

2. Re: crash feature request

Ryan W. Johnson wrote:
> I was trying to get a program to generate ex.err AND suppress the message on
> the screen. It doesn't seem to be possible.
> 
> The ref manual says this:
> 
> for crash_file():
> <quote>
> s may be empty, i.e. "". In this case no diagnostics or debugging information
> will be written to either a file or the screen. s might also be "NUL" or
> "/dev/null",
> in which case diagnostics will be written to the screen, but the ex.err
> information
> will be discarded.
> </quote>
> 
> And for crash_message():
> <quote>
> By calling crash_message() you can control the message that will appear on the
> screen. Debugging information will still be stored in ex.err. You won't lose
> any information by doing this.
> 
> s may contain '\n', new-line characters, so your message can span several
> lines
> on the screen. Euphoria will switch to the top of a clear text-mode screen
> before
> printing your message.
> </quote>
> 
> My proposal is: since you can call crash_file("") to suppress ex.err, do you
> think you could make it so that crash_message("") will just suppress the
> message
> on the screen? That way the error file can still be generated, but then the
> program will just end without making a console window appear.
> 
> I think this would be a useful option for programs that are intended to be
> background
> services that are never supposed to put anything on the screen.

Yes. That was on my (big) list.
I'll try to do it for 3.0, since it
should be fairly easy.

Thanks,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: crash feature request

Robert Craig wrote:
> 
> Ryan W. Johnson wrote:
> > My proposal is: since you can call crash_file("") to suppress ex.err, do you
> > think you could make it so that crash_message("") will just suppress the
> > message
> > on the screen? That way the error file can still be generated, but then the
> > program will just end without making a console window appear.
> > 
> > I think this would be a useful option for programs that are intended to be
> > background
> > services that are never supposed to put anything on the screen.
> 
> Yes. That was on my (big) list.
> I'll try to do it for 3.0, since it
> should be fairly easy.

Thanks, Rob. While we're on the subject of error messages, what do you think
about adding a procedure that could generate a custom run-time error? Such as:
error("Data is corrupt.")

It would cause the program to generate an ex.err file with the custom error
message and behave like any other run-time error.

~Ryan W. Johnson

Fluid Application Environment
http://www.fluidae.com/

[cool quote here, if i ever think of one...]

new topic     » goto parent     » topic index » view message » categorize

4. Re: crash feature request

Ryan W. Johnson wrote:
> 
> Thanks, Rob. While we're on the subject of error messages, what do you think
> about adding a procedure that could generate a custom run-time error? Such as:
> }}}
<eucode>
> error("Data is corrupt.")
> </eucode>
{{{

> It would cause the program to generate an ex.err file with the custom error
> message and behave like any other run-time error.

That would be cool. There are two issues, however. First, error() I'd bet is one
of the most commonly written routines and everyone already has one or more they
use constantly (I know every single one of my programs defines an error
procedure). Second, you can similate it pretty easy by just calling ?1/0 after
you output the error message to get a ex.err dump.


The Euphoria Standard Library project :
    http://esl.sourceforge.net/
The Euphoria Standard Library mailing list :
    https://lists.sourceforge.net/lists/listinfo/esl-discussion

new topic     » goto parent     » topic index » view message » categorize

5. Re: crash feature request

D. Newhall wrote:

> That would be cool. There are two issues, however. First, error() I'd bet is
> one of the most commonly written routines and everyone already has one or more
> they use constantly (I know every single one of my programs defines an error
> procedure).

That's true. I just couldn't think of a better procedure name off the top of my 
head.

> Second, you can similate it pretty easy by just calling ?1/0 after
> you output the error message to get a ex.err dump.

I actually had that in mind. But, I think it would be better if we didn't have
to do that. I just thought I'd mention it, and see if Rob wants to implement it.

~Ryan W. Johnson

Fluid Application Environment
http://www.fluidae.com/

[cool quote here, if i ever think of one...]

new topic     » goto parent     » topic index » view message » categorize

6. Re: crash feature request

Ryan W. Johnson wrote:
> Thanks, Rob. While we're on the subject of error messages, what do you think
> about adding a procedure that could generate a custom run-time error? Such as:
> }}}
<eucode>
> error("Data is corrupt.")
> </eucode>
{{{

> It would cause the program to generate an ex.err file with the custom error
> message and behave like any other run-time error.

It's an interesting idea. I'll add it to my big list,
but I don't think I'll do it for 3.0.

Thanks,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

7. Re: crash feature request

Ryan W. Johnson wrote:

> While we're on the subject of error messages, what do you think about adding
 > a procedure that could generate a custom run-time error?
 > Such as:
> }}}
<eucode>
> error("Data is corrupt.")
> </eucode>
{{{


Or for the pedants amongst us,

"data are corrupt".

new topic     » goto parent     » topic index » view message » categorize

8. Re: crash feature request

Craig Welch wrote:
> 
> Ryan W. Johnson wrote:
> 
> > While we're on the subject of error messages, what do you think about adding
>  > a procedure that could generate a custom run-time error?
>  > Such as:
> > }}}
<eucode>
> > error("Data is corrupt.")
> > </eucode>
{{{

> 
> Or for the pedants amongst us,
> 
> "data are corrupt".
> 

Well, that depends on whether you take "data" to be a collective noun or not.
  For example, "the team is in the dressing room" refers to the team as an
  ensemble, whilst "the team are fighting amongst themselves" refers to the team as
  individuals (example from Wikipedia). Also, see Usage Note here:
  http://www.answers.com/data .

~[ WingZone ]~
http://wingzone.tripod.com/

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu