Skip to content

Commit

Permalink
Fix exception checks in cafObject.cpp
Browse files Browse the repository at this point in the history
* nlohmann json exceptions do not inherit runtime_error
  • Loading branch information
lindkvis committed Sep 13, 2023
1 parent 2d7870c commit b312afd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/cafObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ bool Object::readFromJsonFile( const std::string& filePath )
ObjectPerformer<> performer( []( ObjectHandle* object ) { object->initAfterRead(); } );
performer.visitObject( this );
}
catch ( std::runtime_error& err )
catch ( const std::exception& err )
{
CAFFA_ERROR( err.what() );
return false;
Expand Down Expand Up @@ -108,7 +108,7 @@ bool Object::writeToJsonFile( const std::string& filePath ) const
serializer.setSerializeUuids( false );
serializer.writeStream( this, outStream );
}
catch ( std::runtime_error& err )
catch ( const std::exception& err )
{
CAFFA_ERROR( err.what() );
return false;
Expand Down

0 comments on commit b312afd

Please sign in to comment.