Bladeren bron

Improve FileNotFoundException usage in project classes

Patrick-Christopher Mattulat 1 jaar geleden
bovenliggende
commit
383cd54b3d
3 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 2 2
      source/ls-std/io/FileOutputStream.cpp
  2. 2 2
      source/ls-std/io/FileReader.cpp
  3. 2 2
      source/ls-std/io/FileWriter.cpp

+ 2 - 2
source/ls-std/io/FileOutputStream.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-02-04
+ * Changed:         2023-02-07
  *
  * */
 
@@ -62,7 +62,7 @@ void ls::std::io::FileOutputStream::_init()
 {
   if (!this->file.exists())
   {
-    throw ls::std::core::FileNotFoundException{};
+    throw ls::std::core::FileNotFoundException{"name: " + this->file.getAbsoluteFilePath()};
   }
   else
   {

+ 2 - 2
source/ls-std/io/FileReader.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-04
+ * Changed:         2023-02-07
  *
  * */
 
@@ -49,6 +49,6 @@ void ls::std::io::FileReader::_init(ls::std::io::File &_file)
 {
   if (!_file.exists())
   {
-    throw ls::std::core::FileNotFoundException{};
+    throw ls::std::core::FileNotFoundException{"name: " + _file.getAbsoluteFilePath()};
   }
 }

+ 2 - 2
source/ls-std/io/FileWriter.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-04
+ * Changed:         2023-02-07
  *
  * */
 
@@ -38,6 +38,6 @@ void ls::std::io::FileWriter::_init(ls::std::io::File &_file)
 {
   if (!_file.exists())
   {
-    throw ls::std::core::FileNotFoundException{};
+    throw ls::std::core::FileNotFoundException{"name: " + _file.getAbsoluteFilePath()};
   }
 }