SAGA Adaptor CPI v.1.0
|
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 FirstAdaptorSpecificException = 12, 00043 AdaptorDeclined = FirstAdaptorSpecificException, 00044 NoAdaptor = 13, 00045 NoAdaptorInfo = 14, 00046 Unexpected = 15 00047 }; 00048 } 00049 00051 00052 char const* const error_names[] = { 00053 "Success", 00054 "NotImplemented", 00055 "IncorrectURL", 00056 "BadParameter", 00057 "AlreadyExists", 00058 "DoesNotExist", 00059 "IncorrectState", 00060 "PermissionDenied", 00061 "AuthorizationFailed", 00062 "AuthenticationFailed", 00063 "Timeout", 00064 "NoSuccess", 00065 // these are not in the SAGA spec! 00066 // pretend to be NoSuccess 00067 "NoSuccess", // "AdaptorDeclined", 00068 "NoSuccess", // "NoAdaptor", 00069 "NoSuccess", // "NoAdaptorInfo", 00070 "NoSuccess" // "Unexpected" 00071 }; 00073 00075 } // namespace saga 00076 00077 #endif // SAGA_ERROR_HPP 00078