Changeset 2c801fe in sasmodels


Ignore:
Timestamp:
Mar 26, 2015 2:44:54 PM (10 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
e7724f5
Parents:
9e430d0
Message:

trap and annotate the ctypes load exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    raa4946b r2c801fe  
    1717from . import generate 
    1818from .kernelpy import PyInput, PyModel 
     19from .exception import annotate_exception 
    1920 
    2021# Compiler platform details 
     
    145146 
    146147        #print "dll",self.dllpath 
    147         self.dll = ct.CDLL(self.dllpath) 
     148        try: 
     149            self.dll = ct.CDLL(self.dllpath) 
     150        except Exception, exc: 
     151            annotate_exception("while loading "+self.dllpath) 
     152            raise 
    148153 
    149154        fp = c_float if self.dtype == generate.F32 else c_double 
Note: See TracChangeset for help on using the changeset viewer.