Board index » delphi » Turn warnings off?

Turn warnings off?

hi there does anyone know how to stop a program from showing error messages?
somthing like "warnings := false;" perhaps?
thanks
Alast...@protimeter.com
 

Re:Turn warnings off?


Alastair Dadachanji schrieb:

Quote
> hi there does anyone know how to stop a program from showing error messages?
> somthing like "warnings := false;" perhaps?
> thanks
> Alast...@protimeter.com

{$WARNINGS OFF}

Michael

Re:Turn warnings off?


On Mon, 23 Aug 1999 14:54:41 +0100, "Alastair Dadachanji"

Quote
<Alast...@Protimeter.com> wrote:
>hi there does anyone know how to stop a program from showing error messages?
>somthing like "warnings := false;" perhaps?

My preferred technique is to fix the code that causes the warning.
--
Ray Lischner (http://www.tempest-sw.com/)
Author of "Hidden Paths of Delphi 3: Experts, Wizards, and the Open Tools API"

Re:Turn warnings off?


you may want to consider looking into thje  "ABORT" procedure

---
Unit
SysUtils
Category
flow control routines

procedure Abort;

Use Abort to escape from an execution path without reporting an error.
Abort raises a special "silent exception" which operates like any other
exception, but does not display an error message to the end user.  Abort will
redirect execution to the end of the last try .. finally block.

---

Quote
Alastair Dadachanji wrote:
> hi there does anyone know how to stop a program from showing error messages?
> somthing like "warnings := false;" perhaps?
> thanks
> Alast...@protimeter.com

Re:Turn warnings off?


In article <37c67ab3.676517...@news.proaxis.com>,

Quote
lisch.at.tempest-sw....@nojunkmail.com (Ray Lischner) writes:
>My preferred technique is to fix the code that causes the warning.

I stand in awe at such an outstanding and perceptive solution - you must be a
real programming guru <gg>

After such insight, I really must reconnect my car's oil warning light.

Alan Lloyd
alangll...@aol.com

Re:Turn warnings off?


Quote
AlanGLLoyd wrote:
> In article <37c67ab3.676517...@news.proaxis.com>,
> lisch.at.tempest-sw....@nojunkmail.com (Ray Lischner) writes:

> >My preferred technique is to fix the code that causes the warning.

> I stand in awe at such an outstanding and perceptive solution - you must be a
> real programming guru <gg>

    Laugh all you want. It's the right answer, and it's astonishing how many
"professional" programmers out there think otherwise.

    I don't recall the name (that's a lie, btw) but I recall some time ago
someone asking how to nuke some error message. I suggested he
find the problem in his code. He explained that he knew there were
no bugs in his code. He knew that because he was [name deleted],
the [explanation of what made him a guru, seriously, deleted].

    Saying "fix the code instead" _should_ be a silly answer. But
(incredibly) it isn't, it's excellent advice. How many posts have you
seen explaining that the error message must be wrong? And how
many of those posts turned out to be right about that?

Quote
> After such insight, I really must reconnect my car's oil warning light.

> Alan Lloyd
> alangll...@aol.com

Re:Turn warnings off?


You obviosly are a little short sighted, an error can be a posative result,
there are ways to use everything to your advantage, in my case i'm waiting
for there error, to give me useful information, but the user does not need
to see the error....

Quote
> >My preferred technique is to fix the code that causes the warning.

> I stand in awe at such an outstanding and perceptive solution - you must
be a
> real programming guru <gg>
>    Laugh all you want. It's the right answer, and it's astonishing how
many
>"professional" programmers out there think otherwise.

Regards
    Alastair

Re:Turn warnings off?


Thanks Paris, this looks like what i need....
Regards
    Alastair

Quote
Paris Bleicher wrote in message <37C18621.C85D6...@afstrade.com>...
>you may want to consider looking into thje  "ABORT" procedure

>---
>Unit
>SysUtils
>Category
>flow control routines

>procedure Abort;

>Use Abort to escape from an execution path without reporting an error.
>Abort raises a special "silent exception" which operates like any other
>exception, but does not display an error message to the end user.  Abort
will
>redirect execution to the end of the last try .. finally block.

>---

>Alastair Dadachanji wrote:

>> hi there does anyone know how to stop a program from showing error
messages?
>> somthing like "warnings := false;" perhaps?
>> thanks
>> Alast...@protimeter.com

Re:Turn warnings off?


Quote
Alastair Dadachanji wrote:
> You obviosly are a little short sighted,

    Obviosly.

Quote
> an error can be a posative result,

    ??? I thought you were asking about _warnings_. How can a warning
be a posative result?

Quote
> there are ways to use everything to your advantage, in my case i'm waiting
> for there error, to give me useful information, but the user does not need
> to see the error....

    Try reading the docs on exception handlers. (Don't bother explaining
how Abort is going to allow you to find out about an error without
showing it to the user - I doubt that I'll follow the explanation, being
short-sighted and all.)
Quote
> > >My preferred technique is to fix the code that causes the warning.

> > I stand in awe at such an outstanding and perceptive solution - you must
> be a
> > real programming guru <gg>

> >    Laugh all you want. It's the right answer, and it's astonishing how
> many
> >"professional" programmers out there think otherwise.

> Regards
>     Alastair

Re:Turn warnings off?


ok, cheers for the advice,
but i thought you where saying how fixing the codes that causes the warnings
is the best way to do things. But exception handlers are there to accept the
warnings, "handle" them, and therefore use them.
and so errors can be used to help... Dis' is what I is sayin'!

Quote
David C. Ullrich wrote in message <37CC13C1.2CE1F...@math.okstate.edu>...
>Alastair Dadachanji wrote:

>> You obviosly are a little short sighted,

>    Obviosly.

>> an error can be a posative result,

>    ??? I thought you were asking about _warnings_. How can a warning
>be a posative result?

>> there are ways to use everything to your advantage, in my case i'm
waiting
>> for there error, to give me useful information, but the user does not
need
>> to see the error....

>    Try reading the docs on exception handlers. (Don't bother explaining
>how Abort is going to allow you to find out about an error without
>showing it to the user - I doubt that I'll follow the explanation, being
>short-sighted and all.)

>> > >My preferred technique is to fix the code that causes the warning.

>> > I stand in awe at such an outstanding and perceptive solution - you
must
>> be a
>> > real programming guru <gg>

>> >    Laugh all you want. It's the right answer, and it's astonishing how
>> many
>> >"professional" programmers out there think otherwise.

>> Regards
>>     Alastair

Re:Turn warnings off?


Quote
Alastair Dadachanji wrote:
> ok, cheers for the advice,
> but i thought you where saying how fixing the codes that causes the warnings
> is the best way to do things. But exception handlers are there to accept the
> warnings, "handle" them, and therefore use them.
> and so errors can be used to help... Dis' is what I is sayin'!

    Exception handlers handle _exceptions_. Exception handlers have absolutely
nothing to do with warnings.

    Evidently you meant to be asking about how to hide exceptions from the
user. Fine, saying "warning" in place of "exception" is a reasonable error.
Especially today, after I pointed out yesterday that they're not the same thing.

"Dis" indeed...

    You obviously haven't even glanced at the docs on exceptions if
"use an exception handler" is something you hadn't thought of. Probably
it's very short-sighted of me to think that people should read the docs.
Someday I'll learn to look at the big picture.

Quote
> David C. Ullrich wrote in message <37CC13C1.2CE1F...@math.okstate.edu>...
> >Alastair Dadachanji wrote:

> >> You obviosly are a little short sighted,

> >    Obviosly.

> >> an error can be a posative result,

> >    ??? I thought you were asking about _warnings_. How can a warning
> >be a posative result?

> >> there are ways to use everything to your advantage, in my case i'm
> waiting
> >> for there error, to give me useful information, but the user does not
> need
> >> to see the error....

> >    Try reading the docs on exception handlers. (Don't bother explaining
> >how Abort is going to allow you to find out about an error without
> >showing it to the user - I doubt that I'll follow the explanation, being
> >short-sighted and all.)

> >> > >My preferred technique is to fix the code that causes the warning.

> >> > I stand in awe at such an outstanding and perceptive solution - you
> must
> >> be a
> >> > real programming guru <gg>

> >> >    Laugh all you want. It's the right answer, and it's astonishing how
> >> many
> >> >"professional" programmers out there think otherwise.

> >> Regards
> >>     Alastair

Re:Turn warnings off?


An exception handler will NEVER NEVER NEVER NEVER trap a warning.

Quote
Alastair Dadachanji <Alast...@Protimeter.com> wrote in message

news:936197286.12218.0.nnrp-01.9e98b7a9@news.demon.co.uk...
Quote
> ok, cheers for the advice,
> but i thought you where saying how fixing the codes that causes the
warnings
> is the best way to do things. But exception handlers are there to accept
the
> warnings, "handle" them, and therefore use them.
> and so errors can be used to help... Dis' is what I is sayin'!

> David C. Ullrich wrote in message <37CC13C1.2CE1F...@math.okstate.edu>...
> >Alastair Dadachanji wrote:

> >> You obviosly are a little short sighted,

> >    Obviosly.

> >> an error can be a posative result,

> >    ??? I thought you were asking about _warnings_. How can a warning
> >be a posative result?

> >> there are ways to use everything to your advantage, in my case i'm
> waiting
> >> for there error, to give me useful information, but the user does not
> need
> >> to see the error....

> >    Try reading the docs on exception handlers. (Don't bother explaining
> >how Abort is going to allow you to find out about an error without
> >showing it to the user - I doubt that I'll follow the explanation, being
> >short-sighted and all.)

> >> > >My preferred technique is to fix the code that causes the warning.

> >> > I stand in awe at such an outstanding and perceptive solution - you
> must
> >> be a
> >> > real programming guru <gg>

> >> >    Laugh all you want. It's the right answer, and it's astonishing
how
> >> many
> >> >"professional" programmers out there think otherwise.

> >> Regards
> >>     Alastair

Re:Turn warnings off?


Quote
"David C. Ullrich" wrote:

> Alastair Dadachanji wrote:

> > You obviosly are a little short sighted,

>     Obviosly.

Nice Call David.

Alastair:

Rule #1 of posting to newsgroups: Don't slate the regulars.

MH.

--
Martin Harvey.
mar...@aziraphale.demon.co.uk
mc...@harvey27.demon.co.uk
http://www.harvey27.demon.co.uk/mch24/

Re:Turn warnings off?


hey! buddy! i ain't slating the regs. i was defending the guys who where
helpin' me, who dave had a go at.
regards.

Re:Turn warnings off?


Well i'm glad you all see it my way....

ps warning being the warning or exception message that the user see's

Go to page: [1] [2]

Other Threads