Remove dynamic exceptions
[anna.git] / source / xml / DocumentFile.cpp
index c51ed79..824d99b 100644 (file)
@@ -27,7 +27,7 @@ using namespace anna;
 using namespace anna::xml;
 
 _xmlDoc* DocumentFile::do_initialize(const char* filename)
-throw(RuntimeException) {
+noexcept(false) {
   LOGMETHOD(TraceMethod tf("anna::xml::DocumentFile", "do_initialize", ANNA_FILE_LOCATION));
   _xmlDoc* result;
   a_filename = filename;
@@ -53,14 +53,14 @@ throw(RuntimeException) {
 }
 
 _xmlDoc* DocumentFile::do_initialize(const anna::DataBlock&)
-throw(RuntimeException) {
+noexcept(false) {
   throw RuntimeException("xml::DocumentFile::do_initialize | Not implemented", ANNA_FILE_LOCATION);
   return NULL;
 }
 
 
 const anna::DataBlock& DocumentFile::getContent() const
-throw(RuntimeException) {
+noexcept(false) {
   const anna::DataBlock& result = Document::getContent();
 
   if(result.isEmpty() == false)
@@ -74,7 +74,7 @@ throw(RuntimeException) {
   const int size = lseek(stream, 0, SEEK_END);
   lseek(stream, 0, SEEK_SET);
   char* buffer = new char [size];
-  read(stream, buffer, size);
+  ssize_t r = read(stream, buffer, size);
   close(stream);
   const_cast <DocumentFile*>(this)->setContent(buffer, size);
   delete buffer;