Do more. Code less. Free software for GPU computing.
<scroll to top>

exception.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <iostream>
00004 #include "defines.h"
00005 
00006 namespace af {
00007 
00008 class AFAPI exception
00009 {
00010     public:
00011     exception();
00012     exception(const char *msg);
00013     exception(const char *file, unsigned line);
00014     exception(const char *file, unsigned line, const char *msg);
00015     virtual ~exception() throw() {}
00016     virtual const char *what() const throw() { return m_msg; }
00017 
00018     char m_msg[1024];
00019 
00020     friend inline std::ostream& operator<<(std::ostream &s, const exception &e) { return s << e.what(); }
00021 };
00022 
00023 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines