File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,16 @@ namespace matioCpp
2424 template <typename type>
2525 SlicingInfo computeSlicingInfo (const matioCpp::MultiDimensionalArray<type>& input, const std::vector<int >& slice)
2626 {
27+ std::string errorPrefix = " [ERROR][matioCpp::to_eigen] " ;
28+
2729 using index_type = typename matioCpp::MultiDimensionalArray<type>::index_type;
2830 SlicingInfo info;
2931
3032 const auto & dimensions = input.dimensions ();
3133
3234 if (slice.size () != dimensions.size ())
3335 {
34- std::cerr << " The number of slices must be equal to the number of dimensions of the input MultiDimensionalArray" << std::endl;
36+ std::cerr << errorPrefix << " The number of slices must be equal to the number of dimensions of the input MultiDimensionalArray" << std::endl;
3537 assert (false );
3638 return info;
3739 }
@@ -45,7 +47,7 @@ namespace matioCpp
4547 {
4648 if (slice[i] >= dimensions (i))
4749 {
48- std::cerr << " The slice is larger than the dimension of the input MultiDimensionalArray" << std::endl;
50+ std::cerr << errorPrefix << " The slice is larger than the dimension of the input MultiDimensionalArray" << std::endl;
4951 assert (false );
5052 return SlicingInfo ();
5153 }
@@ -65,7 +67,7 @@ namespace matioCpp
6567 }
6668 else
6769 {
68- std::cerr << " Only at most two free dimensions are allowed" << std::endl;
70+ std::cerr << errorPrefix << " Only at most two free dimensions are allowed" << std::endl;
6971 assert (false );
7072 return SlicingInfo ();
7173 }
You can’t perform that action at this time.
0 commit comments