1. trace file


Can some links be added to the help files concerning trace, ex.err, and crashing? All i wanted was to redirect where the ex.err file was written, and it took an hour to re-discover how to do it. The docs on crash_file() seem to be saying "use this to crash the program", trace docs don't mention redirecting the trace file when it crashes, there's no search results for "ex.err", there are no returns for "specify crash file", no returns on "crashfile", etc etc etc.



useless

new topic     » topic index » view message » categorize

2. Re: trace file

Kat said...

Can some links be added to the help files concerning trace, ex.err, and crashing?

A good idea. I'm sure we can add better docs for this important area.

Kat said...

The docs on crash_file() seem to be saying "use this to crash the program" ...

I'm not seeing that. I think the docs on crash_file() are quite clearly saying that all it does it nominate where crash messages go, in the event that the program happens to crash for whatever reason. It never says anything like "use crash_file() to cause your program to crash. Maybe you have confused the crash() routine with this instead.

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

3. Re: trace file

DerekParnell said...
Kat said...

Can some links be added to the help files concerning trace, ex.err, and crashing?

A good idea. I'm sure we can add better docs for this important area.

Kat said...

The docs on crash_file() seem to be saying "use this to crash the program" ...

I'm not seeing that. I think the docs on crash_file() are quite clearly saying that all it does it nominate where crash messages go, in the event that the program happens to crash for whatever reason. It never says anything like "use crash_file() to cause your program to crash. Maybe you have confused the crash() routine with this instead.


But it is a procedure, procedures do something. To me, calling crash_file() says to go write a crash_file right now. But i don't want a crash_file right now, even if i want a file containing that same data for debugging at this point, i don't want a crash.

I kept trying to set (variable) crash_file = location.

useless

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

4. Re: trace file

useless_ said...

But it is a procedure, procedures do something. To me, calling crash_file() says to go write a crash_file right now. But i don't want a crash_file right now, even if i want a file containing that same data for debugging at this point, i don't want a crash.

I kept trying to set (variable) crash_file = location.

useless

crash_message() and crash_routine() are the same way. It does seem a bit ambiguous. These should probably be called set_crash_file(), set_crash_message(), and set_crash_routine() so that they include verbs. And if we're picking everything apart, warning_file() should be set_warning_file(), and warning() should be warn() or issue_warning().

-Greg

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

5. Re: trace file

In std/error.e why is the language usage inconsistent?

An error condition is described by:

  • crash_message
  • crash_file
  • crash_routine
  • crash
  • ex.err

Language switches from "error" to "crash" back to ".err".

While a "warning" condition is uniformly described:

  • warning_message
  • warning_file
  • warning

The process for an "error" would be better described by: error_message, error_file, error_routine, error, ex.err

We could use exception to mean either error or warning in the same way routine is used to describe procedure or function.

The result would be:

  • make it simple, make the same
  • everything fits into a uniform pattern
  • easier to document
  • easier to remember and use

_tom

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

Search



Quick Links

User menu

Not signed in.

Misc Menu