1. Can't create error message file: ex.err
Hi all,
when there is a run-time error in an Eu program, the interpreter
normally not only produces an "ex.err" file, but also writes a short
error message with the most important information in a console window.
That's pretty nice.
In situations where it's not possible to write an "ex.err" file (e.g.
because the current directory is on a CD-ROM, or there are no more file
handles available), we would expect that Euphoria still writes the cause
of the error in a console window, no?
I recently discovered that this doesn't seem to happen.
? 1/0
Running this code snippet when the current directory is on my hard
drive, EXW.EXE 2.5 says (as expected):
| C:\temp\test.exw:1
| attempt to divide by 0
|
| --> See ex.err
|
|
| Press Enter...
Running this code snippet when the current directory is on a CD-ROM,
EXW.EXE 2.5 says:
| Can't create error message file: ex.err
|
|
| Press Enter...
OK, but what was the primary error?
I have no information about it, since there is no "ex.err" file, and
Euphoria also doesn't tell me something about it in the console window.
I think Euphoria should display the information
"Can't create error message file: ex.err"
_additionally_ to the main error message, but not instead of it.
Regards,
Juergen
--
Who is general fault, and why does he read my hard disk?
2. Re: Can't create error message file: ex.err
- Posted by Robert Craig <rds at RapidEuphoria.com>
Sep 05, 2006
-
Last edited Sep 06, 2006
Juergen Luethje wrote:
> when there is a run-time error in an Eu program, the interpreter
> normally not only produces an "ex.err" file, but also writes a short
> error message with the most important information in a console window.
> That's pretty nice.
>
> In situations where it's not possible to write an "ex.err" file (e.g.
> because the current directory is on a CD-ROM, or there are no more file
> handles available), we would expect that Euphoria still writes the cause
> of the error in a console window, no?
> I recently discovered that this doesn't seem to happen.
Thanks. I'll look into that.
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com
3. Re: Can't create error message file: ex.err
- Posted by "Greg Haberek" <ghaberek at gmail.com>
Sep 05, 2006
-
Last edited Sep 06, 2006
> I have no information about it, since there is no "ex.err" file, and
> Euphoria also doesn't tell me something about it in the console window.
You could always direct your ex.err files to a common location.
constant APPDATA = getenv( "APPDATA" )
if sequence( APPDATA ) then
crash_file( APPDATA & "\\ex.err" )
crash_message( "Please see \"" & APPDATA & "\\ex.err\" for more
information." )
end if
~Greg
4. Re: Can't create error message file: ex.err
On Tue, 5 Sep 2006 16:31:06 -0400, Greg Haberek <ghaberek at gmail.com>
wrote:
>You could always direct your ex.err files to a common location.
>
>constant APPDATA = getenv( "APPDATA" )
I instantly knew there was something deeply wrong with this but I
couldn't quite put my finger on it for a while. Now I realise, if you
are running from CD, then it would be your program and your program
alone that would have to set APPDATA to somewhere not on the CD for
this to work. Makes the whole idea utter nonsense.
No disrespect,
Pete
5. Re: Can't create error message file: ex.err
Greg Haberek wrote:
>> I have no information about it, since there is no "ex.err" file, and
>> Euphoria also doesn't tell me something about it in the console window.
>
> You could always direct your ex.err files to a common location.
>
> }}}
<eucode>
> constant APPDATA = getenv( "APPDATA" )
>
> if sequence( APPDATA ) then
> crash_file( APPDATA & "\\ex.err" )
> crash_message( "Please see \"" & APPDATA & "\\ex.err\" for more
> information." )
> end if
> </eucode>
{{{
I can't remember that I ever encountered an envirinment variable APPDATA
(see also Pete's related post). The envirinment variable TEMP or TMP might
be used instead, though. ( TEMP or TMP pointing to a read-only drive
wouldn't make much sense, would it?
)
However, as I wrote there are other situations where this problem occurs.
I first encountered this problem, when I forgot to close files in a loop.
Try this:
integer fn
for i = 1 to 30 do
fn = open("c:\\autoexec.bat", "r")
end for
? 1/0
And, as I wrote, there actually is not reason why Euphoria should display
the message
"Can't create error message file: ex.err"
_instead of_ of the original error message. I can't believe that Rob
intentionally made Euphoria work this way.
Regards,
Juergen
--
Who is general fault, and why does he read my hard disk?
6. Re: Can't create error message file: ex.err
> I instantly knew there was something deeply wrong with this but I
> couldn't quite put my finger on it for a while. Now I realise, if you
> are running from CD, then it would be your program and your program
> alone that would have to set APPDATA to somewhere not on the CD for
> this to work. Makes the whole idea utter nonsense.
Huh? Open a command line and type
echo %APPDATA%
You'll see it points to a path like "C:\Documents and
Settings\Username\Application Data"
How is that nonsense? I'm confused.
~Greg
7. Re: Can't create error message file: ex.err
> I can't remember that I ever encountered an envirinment variable APPDATA
> (see also Pete's related post). The envirinment variable TEMP or TMP might
> be used instead, though. ( TEMP or TMP pointing to a read-only drive
> wouldn't make much sense, would it?
)
I think APPDATA may be a WinNT only environment variable. TEMP is
pretty standard across all flavors of Windows. I'd stick with that.
~Greg
8. Re: Can't create error message file: ex.err
On Thu, 7 Sep 2006 08:29:38 -0400, Greg Haberek <ghaberek at gmail.com>
wrote:
>> this to work. Makes the whole idea utter nonsense.
oops, overharsh, was not meant to be so.
>
>Huh? Open a command line and type
>
>echo %APPDATA%
Ah, not present on win98. My misunderstanding. Would have made more
sense this end if, as pointed out, use TMP or TEMP.
>
>You'll see it points to a path like "C:\Documents and
>Settings\Username\Application Data"
>
>How is that nonsense? I'm confused.
I apologise for the comment.
It is however still true that Rob should fix this (as he agreed) by
displaying more, rather than application developers trying to
guarantee that an ex.err can be created, too many open files qed.
Regards,
Pete
9. Can't create error message file: ex.err
I'm getting this error message using the pre-alpha non-ncurses version on Linux.
I've checked all the file permissions and everything seems ok, any suggestions
anyone?
Thanks.
10. Re: Can't create error message file: ex.err
Jules Davy wrote:
>
> I'm getting this error message using the pre-alpha non-ncurses version on
> Linux.
> I've checked all the file permissions and everything seems ok, any suggestions
> anyone?
>
> Thanks.
problem not solved but seems to have gone away now. Very mysterious...
11. Re: Can't create error message file: ex.err
Jules Davy wrote:
>
> Jules Davy wrote:
> >
> > I'm getting this error message using the pre-alpha non-ncurses version on
> > Linux.
> > I've checked all the file permissions and everything seems ok, any
> > suggestions
> > anyone?
> >
> > Thanks.
>
> problem not solved but seems to have gone away now. Very mysterious...
Don't know about Linux but that problem can occur on Windows if your program
opens too many files without closing them...
12. Re: Can't create error message file: ex.err
On Mon, 2006-09-25 at 03:33 -0700, Jules Davy wrote:
>
> posted by: Jules Davy <jdavy at dsl.pipex.com>
>
> I'm getting this error message using the pre-alpha non-ncurses version on
> Linux.
> I've checked all the file permissions and everything seems ok, any suggestions
> anyone?
>
> Thanks.
>
Is this the error???
./ecu: error while loading shared libraries: libgpm.so.1: cannot open
shared object file: No such file or directory
Regards,
Euman
13. Re: Can't create error message file: ex.err
Euman wrote:
>
> On Mon, 2006-09-25 at 03:33 -0700, Jules Davy wrote:
> >
> > posted by: Jules Davy <jdavy at dsl.pipex.com>
> >
> > I'm getting this error message using the pre-alpha non-ncurses version on
> > Linux.
> > I've checked all the file permissions and everything seems ok, any
> > suggestions
> > anyone?
> >
> > Thanks.
> >
>
> Is this the error???
>
> ./ecu: error while loading shared libraries: libgpm.so.1: cannot open
> shared object file: No such file or directory
>
> Regards,
> Euman
>
>
Hi Euman,
no it's nothing to do with using ecu or shared libraries. The error comes from
the interpreter
and is "Can't create error message file: ex.err". Nothing to do with opening too
many files either,it seemed
to be independant of the code, which is why I thought it may be due to file
permissions. No problems now, but it would be nice to know why...
14. Can't create error message file: ex.err
No reason given.
No other files running (that have anything to do with Euphoria) in
Ctl-Alt-Del?
Any ideas???
Don Cole
SF
15. Re: Can't create error message file: ex.err
don cole wrote:
>
> No reason given.
> No other files running (that have anything to do with Euphoria) in
> Ctl-Alt-Del?
>
> Any ideas???
>
> Don Cole
> SF
>
Don:
When ever I have had this problem it turned out
that the ex.err was being written to a different
place than where I thought it was. Search your
system for ex.err with find in the explorer.
Also it can be caused by having the a ex.err
file all ready open in a different window of your editor.
Bernie
My files in archive:
w32engin.ew mixedlib.e eu_engin.e win32eru.ew
Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
16. Re: Can't create error message file: ex.err
- Posted by akusaya at gmx.net
May 27, 2005
It happens if you open()ed a file but never closed it, so the maximum
number of open files is reached, Eu cannot open ex.err.
You should examine your code to make sure it's closed.
The common mistake is:
-- **A
for i = 1 to ... do
fn = open("filename", "r") -- **B
for j = 1 to ... do
read a line from file
process line
end for
end for
**B should be placed on **A.
d> posted by: don cole <doncole at pacbell.net>
d> No reason given.
d> No other files running (that have anything to do with Euphoria) in
d> Ctl-Alt-Del?
d> Any ideas???
d> Don Cole
d> SF
17. Re: Can't create error message file: ex.err
akusaya wrote:
>
> It happens if you open()ed a file but never closed it, so the maximum
> number of open files is reached, Eu cannot open ex.err.
>
> You should examine your code to make sure it's closed.
> The common mistake is:
>
>
> -- **A
> for i = 1 to ... do
> fn = open("filename", "r") -- **B
> for j = 1 to ... do
> read a line from file
> process line
> end for
> end for
>
> **B should be placed on **A.
>
>
That's it.
I was openning and reading 258 files and not closing any.
Thank you,
akusaya
Don Cole
SF