TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KURT KUZBA
from: DARIN MCBRIDE
date: 1997-11-30 22:50:00
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™.