Skip to content

Commit

Permalink
Use FILE_READ instead of new enum (#1442)
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters authored Jun 26, 2024
1 parent f123f8e commit 98d5c5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions include/sdf/Error.hh
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,6 @@ namespace sdf

/// \brief Generic error during parsing.
PARSING_ERROR,

/// \brief File not found error.
FILE_NOT_FOUND,
};

class SDFORMAT_VISIBLE Error
Expand Down
6 changes: 3 additions & 3 deletions src/SDF.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ std::string findFile(sdf::Errors &_errors, const std::string &_filename,
{
if (!_config.FindFileCallback())
{
_errors.push_back({sdf::ErrorCode::FILE_NOT_FOUND,
_errors.push_back({sdf::ErrorCode::FILE_READ,
"Tried to use callback in sdf::findFile(), but the callback "
"is empty. Did you call sdf::setFindCallback()?"});
return std::string();
Expand Down Expand Up @@ -378,7 +378,7 @@ void SDF::Write(sdf::Errors &_errors, const std::string &_filename)

if (!out)
{
_errors.push_back({sdf::ErrorCode::FILE_NOT_FOUND,
_errors.push_back({sdf::ErrorCode::FILE_READ,
"Unable to open file[" + _filename + "] for writing."});
return;
}
Expand Down Expand Up @@ -546,7 +546,7 @@ const std::string &SDF::EmbeddedSpec(
}
catch(const std::out_of_range &)
{
_errors.push_back({sdf::ErrorCode::FILE_NOT_FOUND,
_errors.push_back({sdf::ErrorCode::FILE_READ,
"Unable to find SDF filename[" + _filename + "] with " +
"version " + SDF::Version()});
}
Expand Down

0 comments on commit 98d5c5e

Please sign in to comment.