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
24
24
template <typename type>
25
25
SlicingInfo computeSlicingInfo (const matioCpp::MultiDimensionalArray<type>& input, const std::vector<int >& slice)
26
26
{
27
+ std::string errorPrefix = " [ERROR][matioCpp::to_eigen] " ;
28
+
27
29
using index_type = typename matioCpp::MultiDimensionalArray<type>::index_type;
28
30
SlicingInfo info;
29
31
30
32
const auto & dimensions = input.dimensions ();
31
33
32
34
if (slice.size () != dimensions.size ())
33
35
{
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;
35
37
assert (false );
36
38
return info;
37
39
}
@@ -45,7 +47,7 @@ namespace matioCpp
45
47
{
46
48
if (slice[i] >= dimensions (i))
47
49
{
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;
49
51
assert (false );
50
52
return SlicingInfo ();
51
53
}
@@ -65,7 +67,7 @@ namespace matioCpp
65
67
}
66
68
else
67
69
{
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;
69
71
assert (false );
70
72
return SlicingInfo ();
71
73
}
You can’t perform that action at this time.
0 commit comments