#include <stdarg.h>
#include <stdio.h>

#include "fexception.h"
#include "fstring.h"

//============================================================
//                      FExeption                            //
//============================================================

FException::~FException() throw() 
{
    //;//if(msg) delete msg;
}

//------------------------------------------------------------
void FException::init(const char *_type, const char *_fmt, va_list _arg)
{
	//type = _type;
    //if(!msg) msg = new FString();
    msg = _type;
    msg += ": " + FString::vprintf(_fmt, _arg);
}
//------------------------------------------------------------
void FException::init(const char *_type, const FString& _msg)
{
    //if(!msg) msg = new FString();
    msg = _type;
    msg += ": ";
    msg += _msg;
}
//------------------------------------------------------------
const char* FException::Msg() const 
{
    return msg.Str();
}
//============================================================
