Files
winix/core/error.h
Tomasz Sowa 3e328932fc added: created directory 'content' which has Content:: files
added:   created directory 'templates' which has Templates:: and TemplatesFunctions:: files
changed: content.cpp split into many files (directory 'content')
changed: templates.cpp split into many files (directory 'templates')
added:   full permissions
changed: building of the program (GNU make is used now)
         Makefile and Makefile.dep added into directories
added:   a parser 'FunctionParser'
         is used to parse the GET string
         it recognizes directories, items, functions, functions parameters
added:   other classes: Function, Functions 
added:   function: ls, privileges
changed: function 'id' to 'node'
changed: version: to 0.2.0
added/changed: a lot of work have been done


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@469 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-30 01:05:03 +00:00

81 lines
1.3 KiB
C++
Executable File

/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2008, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfileerror
#define headerfileerror
#include <iostream>
#include "log.h"
class Error
{
public:
enum Code
{
ok = 0,
incorrect_path,
db_fatal_error_during_connecting,
db_incorrect_query,
db_incorrent_result_status,
db_no_column,
db_no_item, // !! zamienic na no_item
db_incorrect_login,
db_more_than_one_login,
db_err_currval,
no_postvar,
incorrect_dir,
cant_change_user,
cant_change_group,
cant_change_privileges,
permision_denied, // !! permission_denied (dwa ss)
no_root_dir,
no_function, // !! zamienic na no_function
item_required, // !! zamienic na no_item (i usunac db_no_item)
unknown = 1000
};
Error();
Error(Code c);
Error(int i);
Error(const Error & e);
Error & operator=(Code c);
Error & operator=(const Error & e);
operator int() const;
bool operator==(Code c) const;
bool operator!=(Code c) const;
bool operator==(const Error & e) const;
bool operator!=(const Error & e) const;
friend std::ostream & operator<<(std::ostream & out, const Error & e);
friend Log & operator<<(Log & out, const Error & e);
private:
Code code;
};
#endif