Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Oct 2000
Posts: 2,222
Veteran
Veteran
Offline
Joined: Oct 2000
Posts: 2,222
"I didn't mean to start a controversy with my 'die' comment"

But you didn't [Linked Image]

You did spark a discussion of methods and preferences, not a controversy. That would imply a different intent that is not present here. [Linked Image]

(hint on translating Markisms: Just because he is not wordy sometimes doesn't mean he was giving you a slapdown. He might just have been real busy at the time, when he IS giving you a slapdown it is usually painfully obvious)

"If a script is intended for use by yourself, or other programmers, then a message like "Incorrect file type at line 123 myscript.cgi" may be fine. If the script is intended for use by Mr. Average Websurfer, then I would prefer to handle the error in a way that provides the user with information that he understands."

That's what you did here:
die 'Image file type must be either .gif or .jpg';

Seems just as effective to me as spinning out a fancy webpage with the error message then exit; just not a nice looking.

howabout die 'Image file type must be either .gif or .jpg, hit your backbutton'; ?

You *could* always do it the UBB way, make a sub to pass messages like StandardHTML but for smaller scripts it seems like overkill to me.

I use die 'message'; in everything I write except the UBB. But then again all of the stuff I write for my own websites are a lot smaller, mail scripts, upload scripts, etc. Little nobranier 100 liner stuff. I don't see the need in getting more fancy for my crappy little websites [Linked Image] Your mileage will vary.

Anyhow, point was that "Perhaps "generally not a good approach" was a poor choice of words" was a correct statement. Using die 'message'; is perfectly acceptable depending on circumstances. maybe just not in yours [Linked Image]

------------------
"There is no spoon" is back.

This message has been edited by navaho on December 09, 2000 at 09:47 PM


Picture perfect penmanship here.
Sponsored Links
Entire Thread
Subject Posted By Posted
any quick code to discover if a file is jpg or gif? CopyCat 12/09/2000 3:38 AM
Re: any quick code to discover if a file is jpg or gif? GoTorankusuKu 12/09/2000 4:15 AM
Re: any quick code to discover if a file is jpg or gif? CopyCat 12/09/2000 4:20 AM
Re: any quick code to discover if a file is jpg or gif? Dave_L 12/09/2000 7:21 AM
Re: any quick code to discover if a file is jpg or gif? CopyCat 12/09/2000 7:27 AM
Re: any quick code to discover if a file is jpg or gif? zanardi 12/09/2000 8:00 AM
Re: any quick code to discover if a file is jpg or gif? CopyCat 12/09/2000 8:21 AM
Re: any quick code to discover if a file is jpg or gif? Dave_L 12/09/2000 5:40 PM
Re: any quick code to discover if a file is jpg or gif? CopyCat 12/09/2000 7:36 PM
Re: any quick code to discover if a file is jpg or gif? Dave_L 12/09/2000 8:28 PM
Re: any quick code to discover if a file is jpg or gif? Mark Badolato 12/09/2000 9:12 PM
Re: any quick code to discover if a file is jpg or gif? CopyCat 12/09/2000 9:42 PM
Re: any quick code to discover if a file is jpg or gif? Dave_L 12/09/2000 9:44 PM
Re: any quick code to discover if a file is jpg or gif? Greg Hard 12/10/2000 1:18 AM
Re: any quick code to discover if a file is jpg or gif? Mark Badolato 12/10/2000 1:29 AM
Re: any quick code to discover if a file is jpg or gif? Greg Hard 12/10/2000 2:27 AM
Re: any quick code to discover if a file is jpg or gif? Dave_L 12/10/2000 2:32 AM
Re: any quick code to discover if a file is jpg or gif? navaho 12/10/2000 5:43 AM
Re: any quick code to discover if a file is jpg or gif? Mark Badolato 12/10/2000 5:51 AM
Re: any quick code to discover if a file is jpg or gif? CopyCat 12/10/2000 6:30 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1841
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 14
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)