Back to index

nordugrid-arc-nox  1.1.0~rc6
DataStatus.cpp
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #include <arc/data/DataStatus.h>
00004 #include <arc/IString.h>
00005 
00006 namespace Arc {
00007 
00008   static const char *status_string[DataStatus::UnknownError + 1] = {
00009     istring("Operation completed successfully"),
00010     istring("Source is bad URL or can't be used due to some reason"),
00011     istring("Destination is bad URL or can't be used due to some reason"),
00012     istring("Resolving of index service URL for source failed"),
00013     istring("Resolving of index service URL for destination failed"),
00014     istring("Can't read from source"),
00015     istring("Can't write to destination"),
00016     istring("Failed while reading from source"),
00017     istring("Failed while writing to destination"),
00018     istring("Failed while transfering data (mostly timeout)"),
00019     istring("Failed while finishing reading from source"),
00020     istring("Failed while finishing writing to destination"),
00021     istring("First stage of registration of index service URL failed"),
00022     istring("Last stage of registration of index service URL failed"),
00023     istring("Unregistration of index service URL failed"),
00024     istring("Error in caching procedure"),
00025     istring("Error due to provided credentials are expired"),
00026     istring("Error deleting location or URL"),
00027     istring("No valid location available"),
00028     istring("Location already exists"),
00029     istring("Operation has no sense for this kind of URL"),
00030     istring("Feature is not implemented"),
00031     istring("DataPoint is already reading"),
00032     istring("DataPoint is already writing"),
00033     istring("Access check failed"),
00034     istring("File listing failed"),
00035     istring("Object not initialized (internal error)"),
00036     istring("System error"),
00037     istring("Failed to stage file(s)"),
00038     istring("Unknown error")
00039   };
00040 
00041   DataStatus::operator std::string() const {
00042     unsigned int status_ = status;
00043     if (status_ >= DataStatusRetryableBase) status_-=DataStatusRetryableBase;
00044     if (status_ > UnknownError) status_=UnknownError;
00045     return status_string[status_];
00046   }
00047 
00048 } // namespace Arc