mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-06-20 16:26:54 +01:00
more robust type cast in I/O functions
This commit is contained in:
@ -110,6 +110,12 @@ const IoT& File::getData(const std::string &name) const
|
||||
LATAN_ERROR(Definition, "no data with name '" + name + "' in file "
|
||||
+ name_);
|
||||
}
|
||||
catch(std::bad_cast)
|
||||
{
|
||||
LATAN_ERROR(Definition, "data with name '" + name + "' in file "
|
||||
+ name_ + " does not have type '" + typeid(IoT).name()
|
||||
+ "'");
|
||||
}
|
||||
}
|
||||
|
||||
END_LATAN_NAMESPACE
|
||||
|
Reference in New Issue
Block a user