Show
Ignore:
Timestamp:
02/16/10 10:59:22 (2 years ago)
Author:
apdavison
Message:

Moved Error classes out of common into an errors module (see ticket:157)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/neuron/simulator.py

    r702 r711  
    2929 
    3030from pyNN import __path__ as pyNN_path 
    31 from pyNN import common, random 
     31from pyNN import common, random, errors 
    3232import platform 
    3333import logging 
     
    282282            cell_model = getattr(h, cellclass) 
    283283        except AttributeError: 
    284             raise common.InvalidModelError("There is no hoc template called %s" % cellclass) 
     284            raise errors.InvalidModelError("There is no hoc template called %s" % cellclass) 
    285285        cell_parameters = cellparams or {} 
    286286    elif isinstance(cellclass, type) and issubclass(cellclass, common.StandardCellType): 
     
    463463        if not isinstance(source, int) or source > state.gid_counter or source < 0: 
    464464            errmsg = "Invalid source ID: %s (gid_counter=%d)" % (source, state.gid_counter) 
    465             raise common.ConnectionError(errmsg) 
     465            raise errors.ConnectionError(errmsg) 
    466466        if not common.is_listlike(targets): 
    467467            targets = [targets] 
     
    473473        for target in targets: 
    474474            if not isinstance(target, common.IDMixin): 
    475                 raise common.ConnectionError("Invalid target ID: %s" % target) 
     475                raise errors.ConnectionError("Invalid target ID: %s" % target) 
    476476               
    477477        assert len(targets) == len(weights) == len(delays), "%s %s %s" % (len(targets),len(weights),len(delays))