- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Search for |

# error.hpp

Go to the documentation of this file.

    00001 //  Copyright (c) 2005-2007 Andre Merzky (andre@merzky.net)
    00002 //  Copyright (c) 2005-2009 Hartmut Kaiser
    00003 //  Copyright (c) 2007 Ole Weidner (oweidner@cct.lsu.edu)
    00004 //
    00005 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
    00006 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    00007
    00008 #if !defined(SAGA_ERROR_HPP)
    00009 #define SAGA_ERROR_HPP
    00010
    00012 namespace saga {
    00013
    00018   enum error {
    00019     //  This list is sorted, with the most specific exceptions are listed first
    00020     //  and least specific last.
    00021     //  The most specific exception possible (i.e., applicable) MUST be thrown
    00022     //  on all error conditions.
    00023     NotImplemented        = 1,
    00024     IncorrectURL          = 2,
    00025     BadParameter          = 3,
    00026     AlreadyExists         = 4,
    00027     DoesNotExist          = 5,
    00028     IncorrectState        = 6,
    00029     PermissionDenied      = 7,
    00030     AuthorizationFailed   = 8,
    00031     AuthenticationFailed  = 9,
    00032     Timeout               = 10,
    00033     NoSuccess             = 11
    00034   };
    00035
    00037   namespace adaptors
    00038   {
    00039       enum error {
    00040         // these are not in the SAGA spec!
    00041         Success           = 0,
    00042         NoAdaptor         = 12,
    00043         NoAdaptorInfo     = 13,
    00044         Unexpected        = 14
    00045       };
    00046   }
    00047
    00049
    00050   char const* const error_names[] = {
    00051     "Success",
    00052     "NotImplemented",
    00053     "IncorrectURL",
    00054     "BadParameter",
    00055     "AlreadyExists",
    00056     "DoesNotExist",
    00057     "IncorrectState",
    00058     "PermissionDenied",
    00059     "AuthorizationFailed",
    00060     "AuthenticationFailed",
    00061     "Timeout",
    00062     "NoSuccess",
    00063     // these are not in the SAGA spec!
    00064     // FIXME: then they MUST NOT be exposed on API level - AM
    00065      "NoAdaptor",
    00066      "NoAdaptorInfo",
    00067      "Unexpected"
    00068   };
    00070
    00072 } // namespace saga
    00073
    00074 #endif // SAGA_ERROR_HPP
    00075