[mlpack-git] master: Be more clear with error message. (1efafa1)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Fri Dec 4 09:31:21 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/458bd20685bdfd8a7918e1b64c45161f965e0080...1efafa13b304c7821d858754b0d2dab9a05795a7
>---------------------------------------------------------------
commit 1efafa13b304c7821d858754b0d2dab9a05795a7
Author: Ryan Curtin <ryan at ratml.org>
Date: Fri Dec 4 06:30:54 2015 -0800
Be more clear with error message.
>---------------------------------------------------------------
1efafa13b304c7821d858754b0d2dab9a05795a7
src/mlpack/core/data/load_impl.hpp | 6 ++++--
src/mlpack/core/data/save_impl.hpp | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/mlpack/core/data/load_impl.hpp b/src/mlpack/core/data/load_impl.hpp
index 0fbe956..9382c8d 100644
--- a/src/mlpack/core/data/load_impl.hpp
+++ b/src/mlpack/core/data/load_impl.hpp
@@ -331,9 +331,11 @@ bool Load(const std::string& filename,
if (!ifs.is_open())
{
if (fatal)
- Log::Fatal << "Unable to open file '" << filename << "'." << std::endl;
+ Log::Fatal << "Unable to open file '" << filename << "' to load object '"
+ << name << "'." << std::endl;
else
- Log::Warn << "Unable to open file '" << filename << "'." << std::endl;
+ Log::Warn << "Unable to open file '" << filename << "' to load object '"
+ << name << "'." << std::endl;
return false;
}
diff --git a/src/mlpack/core/data/save_impl.hpp b/src/mlpack/core/data/save_impl.hpp
index 81ac0aa..a6c9a4b 100644
--- a/src/mlpack/core/data/save_impl.hpp
+++ b/src/mlpack/core/data/save_impl.hpp
@@ -214,9 +214,11 @@ bool Save(const std::string& filename,
if (!ofs.is_open())
{
if (fatal)
- Log::Fatal << "Unable to open file '" << filename << "'." << std::endl;
+ Log::Fatal << "Unable to open file '" << filename << "' to save object '"
+ << name << "'." << std::endl;
else
- Log::Warn << "Unable to open file '" << filename << "'." << std::endl;
+ Log::Warn << "Unable to open file '" << filename << "' to save object '"
+ << name << "'." << std::endl;
return false;
}
More information about the mlpack-git
mailing list