Skip to content
Snippets Groups Projects
Commit a6452090 authored by Victor Poughon's avatar Victor Poughon
Browse files

RFC-91: catch ImageFileReaderException in Python Wrapper

parent 959f0cd4
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,10 @@
%exception {
try {
$action
} catch(otb::ImageFileReaderException& err) {
std::ostringstream oss;
oss << "Cannot open image " << err.m_Filename + ". " + err.GetDescription();
SWIG_exception( SWIG_RuntimeError, oss.str().c_str() );
} catch( itk::ExceptionObject &ex ) {
std::ostringstream oss;
oss << "Exception thrown in otbApplication $symname: " << ex.what();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment