Wish : Structerd Exception Handling

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
idStefke
User
User
Posts: 25
Joined: Sun May 04, 2003 10:01 pm
Location: BELGIUM

Wish : Structerd Exception Handling

Post by idStefke »

Fred,

I wish an more structured Exception Handling for Hardware and Software
exceptions and buildin constants for all the occured exceptions in your applications.

The syntax of this Exception handling routine: (see the syntax in VB.NET)

TRYE
<procted code
CATCH <e> AS <ExceptionConstant>
THROW ()
FINALLY

END TRY


I would that tis is usefull for all the users here, because for me is Exception handling very important for my GUI 32 applications

Kind regards
Stephane
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2138
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

Stephane, did you already take a look on the new OnError library in v3.70 ?
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

Stephane, I can appreciate your wish, but PB can not be all things to all people (not yet anyways!) ;) The new OnError commands are much appreciated and are worth taking a look at. (Thank you, Fred!)

Yes, VB.Net 'has it all', but a microscopically small company like Fred's (in comparison to MS) can only do so much. This is not even his full time job! I take my hat off to Fred and C. for what they have already done: Quite a feat if you ask me, for $60US! :)

Little by little you will see some of these things being added to PB. And the nice part is: You'll never see the bloat and inefficiency of VB ;)

Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

With 3.7 you can enbedd Errorhandling on your own or leave it.
If you wanna use TRY/CATCH better switch to C or the .NET-Environment .
SPAMINATOR NR.1
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

Stephane has been bothering everybody on the 'PowerBASIC' forum for the last 2 or 3 years. He's a nut case. Period.

He claims to be a student at Ghent University in Belgium and ALWAYS asks for things over and over and over again. He almost never sticks around to discuss his requests and answer his posts. I think he does this just to see if he can get a rise out of us! :(

The best thing to do is... ignore him. Maybe he'll go and bother some other forum.

--blueb
idStefke
User
User
Posts: 25
Joined: Sun May 04, 2003 10:01 pm
Location: BELGIUM

Post by idStefke »

blueb wrote:Stephane has been bothering everybody on the 'PowerBASIC' forum for the last 2 or 3 years. He's a nut case. Period.

He claims to be a student at Ghent University in Belgium and ALWAYS asks for things over and over and over again. He almost never sticks around to discuss his requests and answer his posts. I think he does this just to see if he can get a rise out of us! :(

The best thing to do is... ignore him. Maybe he'll go and bother some other forum.

--blueb
That's not true

I'm learning at school VB.NET but it's better that here in Belgium PowerBASIC is learned or PureBASIC
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

Stephanie,

With corporate languages like the .Net family, Java or C++ there is a tendancy towards abstraction. This path towards greater and greater abstraction fulfills the needs of large business who gain economies of scale through the division of labour.

These levels of abstraction come at a cost. This article makes for an interesting read: http://www.joelonsoftware.com/articles/ ... tions.html

PureBasic is optimised towards the individual programmer, or perhaps a small team, who have to take care of everything.

With these other languages it can take years just to understand the complexities of one aspect. At work I have a book three inches thick on Java Swing. An even bigger reference for SQL Server and a 'Slim' nutshell reference for the Core language. Keeping up to date with it all is a full time job.

This is why I appreciate PureBasic for what it is. I can write code in PureBasic in hardly any time and it Just Works. After a few weeks playing with the language (no serious study) I feel I know most of what I need about building GUIs or building a database. Everything is nice and Simple.

Sometimes I get frustrated because theres a nice feature in Java that would make a particular problem easier to solve (I especially miss the container classes) but after a bit of headscratching I find a suprisingly simple solution to my problems.

The reward I get is tiny executables that run like the wind. Definately worth it, though I'd never ask my employers to start using PureBasic for their corporate Point of Sales system - its just not the right tool for that particlar job.

Keep up the good work Fred and don't leave that road less traveled.
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

@GedB: Very succinctly put, and the article is, indeed, an interesting read. C++, IMHO, was created to drive the procedural programmer to drink hard liquor! ;) Doesn't the original developer of C++ know what a keyword is? Symbols symbols symbols! Maybe we could require the programmer to type commands in reverse or use alternating upper and lowercase letters to make it more difficult? :twisted:

<calms down>

So, yeah, Purebasic is much easier to program in. :)

Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
Post Reply