| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Try blocks |
KK> You can take advantage of this by using try and catch.
KK> try
KK> {
KK> PlayerClass *Player = new PlayerClass;
KK> return Player;
KK> }
KK> catch
er, catch what?
catch(XAlloc& xa)
{
cout << "Error allocating player:" << endl;
cout << xa << endl;
//...
I can't actually remember the exception type that new returns, though. :-)
--- Maximus/2 3.01
---------------
* Origin: Tanktalus' Tower BBS (1:250/102) |
|
| SOURCE: echomail via exec-pc | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.