mkvtoolnix/error.h

39 lines
819 B
C
Raw Normal View History

2003-02-16 11:44:19 +00:00
/*
mkvmerge -- utility for splicing together matroska files
from component media subtypes
error.h
Written by Moritz Bunkus <moritz@bunkus.org>
Distributed under the GPL
see the file COPYING for details
or visit http://www.gnu.org/copyleft/gpl.html
*/
2003-02-16 12:17:11 +00:00
/*!
\file
\version \$Id: error.h,v 1.4 2003/02/26 19:20:26 mosu Exp $
2003-02-16 12:17:11 +00:00
\brief class definitions for the error exception class
\author Moritz Bunkus <moritz @ bunkus.org>
*/
2003-02-16 17:04:39 +00:00
#ifndef __ERROR_H
#define __ERROR_H
2003-02-16 11:44:19 +00:00
#include <malloc.h>
#include <string.h>
#include "common.h"
2003-02-16 11:44:19 +00:00
class error_c {
private:
char *error;
public:
error_c(char *nerror) { error = strdup(nerror); if (!error) die("strdup"); };
~error_c() { if (error) free(error); };
char *get_error() { return error; };
2003-02-16 11:44:19 +00:00
};
2003-02-16 17:04:39 +00:00
#endif // __ERROR_H