Browse Source

Added FileNotFoundException class

- added FileNotFoundException exception to give a
hint, that a file could not be found
Patrick 4 năm trước cách đây
mục cha
commit
ae125cc1c8
1 tập tin đã thay đổi với 29 bổ sung0 xóa
  1. 29 0
      source/exception/FileNotFoundException.hpp

+ 29 - 0
source/exception/FileNotFoundException.hpp

@@ -0,0 +1,29 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-08-17
+ * Changed:         2020-08-17
+ *
+ * */
+
+#ifndef FILE_NOT_FOUND_EXCEPTION_HPP
+#define FILE_NOT_FOUND_EXCEPTION_HPP
+
+#include <exception>
+#include <string>
+#include <cstring>
+
+namespace ls_std {
+  class FileNotFoundException : public std::exception {
+    public:
+
+      FileNotFoundException() = default;
+
+      const char *what() const noexcept override {
+        return "file not found!";
+      };
+  };
+}
+
+#endif