/*********************************************************************//**
*	\brief Implementace vypisu chyb a casto pouzivanych chybovych hlasek.
*	
*	\author Michal Jirous
*	\date 8.12.2008
*	\file error_handler.h
**********************************************************************/

#ifndef __ERROR_HANDLER_H__
#define __ERROR_HANDLER_H__

#ifdef PHOBIA_CONSOLE
#include "sys_console.h"
#define PRINT_ERROR(error)	systemConsole::console << error << systemConsole::endline
#define CONSOLE_PRINT_LN(str)	systemConsole::console << str << systemConsole::endline
#define CONSOLE_PRINT(str)	systemConsole::console << str
#else
#include <iostream>
#define PRINT_ERROR(error)	std::cerr << error << std::endl
#define CONSOLE_PRINT_LN(str)	std::cout << str << std::endl
#define CONSOLE_PRINT(str)	std::cout << str
#endif



#define ERR_FILENOTFOUND(filename) PRINT_ERROR( "Error: File '" << filename << "' not found." )
#define ERR_OPENINGFILEFOR(filename,forwhat) PRINT_ERROR( "Error: Opening '" << filename << "' for " << forwhat << "." )

#endif
