Changeset 13634


Ignore:
Timestamp:
Oct 1, 2019 5:15:02 PM (2 months ago)
Author:
randersson
Message:

#5819 Updated two additional IOErrors to OSErrors, see r13618

Location:
branches/dev-5819/Python/src/pymodelica
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-5819/Python/src/pymodelica/compiler_logging.py

    r13619 r13634  
    322322       
    323323        if exception.kind == 'java.io.FileNotFoundException':
    324             raise IOError(exception.message)
     324            raise OSError(exception.message)
    325325       
    326326        if exception.kind == 'org.jmodelica.util.logging.IllegalLogStringException':
     
    340340       
    341341        if exception.kind == 'xml.sax.SAXParseException':
    342             raise IOError(exception.message)
     342            raise OSError(exception.message)
    343343
    344344        if exception.kind == 'org.jmodelica.util.exceptions.IllegalCompilerArgumentException':
  • branches/dev-5819/Python/src/pymodelica/compiler_wrappers.py

    r13618 r13634  
    567567        if _py_handle_exception(ex, jpype.java.io.FileNotFoundException):
    568568            raise OSError(
    569                 '\nMessage: '+ex.message().encode('utf-8')+\
    570                 '\nStacktrace: '+ex.stacktrace().encode('utf-8'))
     569                '\nMessage: '+str(ex.message().encode('utf-8'))+\
     570                '\nStacktrace: '+str(ex.stacktrace().encode('utf-8')))
    571571       
    572572        if _py_handle_exception(ex, jpype.java.io.IOException):
Note: See TracChangeset for help on using the changeset viewer.