SmaugWizard/Backup/
SmaugWizard/Backup/L/
SmaugWizard/Boards/
SmaugWizard/Building/
SmaugWizard/Corpses/
SmaugWizard/Councils/
SmaugWizard/Deity/
SmaugWizard/Gods/
SmaugWizard/MudProgs/
SmaugWizard/Player/L/
SmaugWizard/Src/
SmaugWizard/Src/res/
/****************************************************************************
 * [S]imulated [M]edieval [A]dventure multi[U]ser [G]ame      |				*
 * -----------------------------------------------------------|   \\._.//	*
 * SmaugWizard (C) 1998 by Russ Pillsbury (Windows NT version)|   (0...0)	*
 * -----------------------------------------------------------|    ).:.(	*
 * SMAUG (C) 1994, 1995, 1996 by Derek Snider                 |    {o o}	*
 * -----------------------------------------------------------|   / ' ' \	*
 * SMAUG code team: Thoric, Altrag, Blodkai, Narn, Haus,      |~'~.VxvxV.~'~*
 * Scryn, Swordbearer, Rennard, Tricops, and Gorog.           |				*
 * ------------------------------------------------------------------------ *
 * Merc 2.1 Diku Mud improvments copyright (C) 1992, 1993 by Michael        *
 * Chastain, Michael Quan, and Mitchell Tse.                                *
 * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer,          *
 * Michael Seifert, Hans Henrik Staerfeldt, Tom Madsen, and Katja Nyboe.    *
 ****************************************************************************/
// Smaugx.h - SmaugWiz Exception handler class

#ifndef		SMAUGX_H
#define		SMAUGX_H

enum {  SE_BOOT = 100,				// generic boot exception
		SE_COMMAND, SE_SOCIAL, SE_SKILL, SE_HERB, SE_CLASS, SE_RACE, SE_AREA,
		SE_CLANS, SE_COUNCIL, SE_DEITY, SE_MOBILE, SE_OBJECT, SE_ROOM,
		SE_SPECIAL, SE_MOBPROG, SE_OBJPROG, SE_ROOMPROG, SE_NOTES,
		SE_LANGUAGE };

void PASCAL ThrowSmaugException (int cause);

class CSmaugException : public CException
{
	DECLARE_DYNAMIC(CSmaugException)

public:
	enum { none, generic };

	CSmaugException (int cause = CSmaugException::none)
	{ m_cause = cause; }

	int  m_cause;

#ifdef _DEBUG
	virtual void Dump (CDumpContext&) const;
#endif
};

#define	GetSmaugException(ex) (ex->IsKindOf (RUNTIME_CLASS(CSmaugException)) ? \
			((CSmaugException*)ex)->m_cause : -1)

#endif


class CSwException {
public:
			CSwException () { m_ch = NULL; m_buf [0] = 0; }
			CSwException (CSwException& E)
			{ m_ch = E.m_ch; strcpy (m_buf, E.m_buf); }

	void	SetChar (CCharacter* ch) { m_ch = ch; }
	void	Printf (char *fmt, ...);

	CCharacter*	m_ch;
	char		m_buf [MAX_STRING_LENGTH*2];
};