POV-Ray : Newsgroups : povray.beta-test : #error bug Server Time
2 Nov 2024 15:24:39 EDT (-0400)
  #error bug (Message 1 to 10 of 43)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Rune
Subject: #error bug
Date: 20 Oct 2001 06:26:38
Message: <3bd1515e$1@news.povray.org>
Bug: When using the #error directive the string is not printed.

From the POV-Ray documentation:

--------------------
6.2.7.1  Text Message Streams
The syntax for a text message is any of the following:

TEXT_STREAM_DIRECTIVE:
    #debug STRING | #error STRING | #warning STRING

Where STRING is any valid string of text including string identifiers or
functions which return strings.
--------------------

But when running the following scene:

--------------------
#declare String = "B must be a positive number!"

#error String
--------------------

POV-Ray prints the following to the message pane:

--------------------
File: C:\Programmer\POV-scenes\#Mine\35tests\Errorbug.pov  Line: 5


#error String <----ERROR

Parse Error: User error directive hit.


Returned from renderer with error status
--------------------

IIRC this has been the behavior in any version of POV-Ray I know of.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: #error bug
Date: 20 Oct 2001 07:19:10
Message: <3bd15dae$1@news.povray.org>
In article <3bd1515e$1@news.povray.org> , "Rune" 
<run### [at] mobilixnetdk> wrote:

> Bug: When using the #error directive the string is not printed.

This is a documentation problem IMO.  As the error is "caused" by the user
POV-Ray should really not print it out because this would make it look like
_POV-Ray_ generated the error, which is not true.


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Rune
Subject: Re: #error bug
Date: 20 Oct 2001 07:46:10
Message: <3bd16402@news.povray.org>
"Thorsten Froehlich" wrote:
> This is a documentation problem IMO.  As the error is
> "caused" by the user POV-Ray should really not print it
> out because this would make it look like _POV-Ray_
> generated the error, which is not true.

What???

So does it also look like POV-Ray is making all #debug and #warning
messages?

I don't get your reasoning. Please tell me again why creators of include
files should not have the ability to output an instructive error message to
the user. The pane can still say "Parse Error: User error directive hit."
but it should also print the string so the user can know what the error is.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Redbeard (MDJohnson)
Subject: Re: #error bug
Date: 20 Oct 2001 09:39:16
Message: <3bd17e84@news.povray.org>
"Rune" <run### [at] mobilixnetdk> wrote in message
news:3bd16402@news.povray.org...
> "Thorsten Froehlich" wrote:
> > This is a documentation problem IMO.  As the error is
> > "caused" by the user POV-Ray should really not print it
> > out because this would make it look like _POV-Ray_
> > generated the error, which is not true.
>
> What???
>
> So does it also look like POV-Ray is making all #debug and #warning
> messages?
>
> I don't get your reasoning. Please tell me again why creators of include
> files should not have the ability to output an instructive error message to
> the user. The pane can still say "Parse Error: User error directive hit."
> but it should also print the string so the user can know what the error is.
>

I concur.  For a while I was writing #warning messages followed by #error to
stop the parse.  But that means two lines of code where one should suffice.

IMO, if #error doesn't print the string it's passed, it shouldn't require a
string.  So, either the requirement should be used or the string should be
printed after being parsed.

BTW, if you omit the string, the following error occurs:
File: C:\My Documents\POVRay\Test\error.pov  Line: 1
#error

 <----ERROR

Parse Error: Expected 'string expression', End of File found instead


Returned from renderer with error status

Michael


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: #error bug
Date: 20 Oct 2001 10:29:11
Message: <3bd18a37@news.povray.org>
In article <3bd16402@news.povray.org> , "Rune" <run### [at] mobilixnetdk>
wrote:

> I don't get your reasoning. Please tell me again why creators of include
> files should not have the ability to output an instructive error message to
> the user.

Because the error messages tend to be assumed to come from POV-Ray most of
the time.  This is even true for warnings, but as those don't stop POV-Ray
people who don't understand the difference will just wonder but hardly ever
complain.  With an error message on the other hand, especially one that
cannot be found in the scene file it is far less likely people will
understand why they got an error because POV-Ray is pointing at one place
but showing a completely different message.

Let me give you an example question I expect to show up in p.newusers within
a few weeks after the error output would have been changed:

>>
Help!  POV-Ray doesn't like my aspect ratio whatever that is!  It says
"Parse Error: User error directive hit. Your aspect ratio will not work with
this scene!"  What am i doing wrong?
<<

I know, I know, I should not make such assumptions and because #error
directives are rare we might not see many of these problems reported, but I
am sure that we will see 50% of *all* #error problems being reported while
we might only see 0.1% of all #warning directive problems being reported
simply because a warning is something a user can ignore but an error he/she
has to deal with!


    Thorsten


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: #error bug
Date: 20 Oct 2001 10:31:15
Message: <3bd18ab3$1@news.povray.org>
In article <3bd17e84@news.povray.org> , "Redbeard \(MDJohnson\)" 
<red### [at] wvadelphianet> wrote:

> IMO, if #error doesn't print the string it's passed, it shouldn't require a
> string.

An #error should not allow a string, but enforce a quoted "something".  This
is necessary so one at least has a chance to find out what the #error is
about without having to read the whole scene file.

    Thorsten


Post a reply to this message

From: Rune
Subject: Re: #error bug
Date: 20 Oct 2001 10:51:14
Message: <3bd18f62@news.povray.org>
"Thorsten Froehlich" wrote:
> "Redbeard (MDJohnson)" wrote:
>
> > IMO, if #error doesn't print the string it's passed,
> > it shouldn't require a string.
>
> An #error should not allow a string,

But it requires a string. That must be a bug then?

> but enforce a quoted "something".

A quoted "something" that is not a string? How do you define this in clear
terms?

> This is necessary so one at least has a chance to find
> out what the #error is about without having to read the
> whole scene file.

Perhaps the word you're looking for is "comment". However, comments have a
different syntax which is // or /* */

As it is now there's clearly something wrong as the directive requires a
string but doesn't use it for anything.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: #error bug
Date: 20 Oct 2001 11:51:54
Message: <3bd19d9a@news.povray.org>
In article <3bd18f62@news.povray.org> , "Rune" <run### [at] mobilixnetdk>
wrote:

>> An #error should not allow a string,
>
> But it requires a string. That must be a bug then?
>
>> but enforce a quoted "something".
>
> A quoted "something" that is not a string? How do you define this in clear
> terms?

There are two different definitions of "string" we are talking about.  The
firs one is what POV-Ray allows as a function that defines a string, which
in the POV-Ray parser syntax is simply called "STRING".  The second
definition, which I called "quoted something" is simply anything that may
appear between two quotes, but no functions or other tokens.

To show it by example, the following should be legal:

#error "My message"
#error ""
#error "abc"

While these should be illegal:

#error foo
#error this is the error message
#error

The reasoning behind this being a) that the error message is easier to find
in the complex POV-Ray syntax because it gets colored in the most common
editors used to edit pov files and b) that it is easy to find the end of the
error message simply by looking for the second quote so POV-Ray can gibe the
error location at the end of the #error line.

I should note that b) is also the reason why it currently takes a string -
this way the error will point to the end of the #error directive message
rather than the beginning.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Rune
Subject: Re: #error bug
Date: 20 Oct 2001 14:25:23
Message: <3bd1c193@news.povray.org>
And I repeat:

POV-Ray *does* allow a pre-defined string to be used. You said that it
shouldn't allow a pre-defined string to be used*. So that must be a bug?

* quote from Thorsten:

"An #error should not allow a string, but enforce a quoted "something"."

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: #error bug
Date: 20 Oct 2001 14:59:35
Message: <3bd1c997@news.povray.org>
In article <3bd1c193@news.povray.org> , "Rune" <run### [at] mobilixnetdk>
wrote:

> So that must be a bug?

No, because the documentation never says that the #error string is printed
to the #error stream and the documentation matches what POV-Ray does.  Of
course this does not mean it is the best way to do it or that this
particular part of the documentation is perfect, but an incomplete
specification isn't a bug.  Oh, and note that the error message is actually
displayed once already in the line showing with the #error directive...

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.