Source code for spynnaker.pyNN.exceptions

# Copyright (c) 2014 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from spinn_front_end_common.utilities.exceptions import ConfigurationException


[docs] class SpynnakerException(Exception): """ Superclass of all exceptions from the PyNN module. """
[docs] class MemReadException(SpynnakerException): """ Raised when the PyNN front end fails to read a certain memory region. """
[docs] class FilterableException(SpynnakerException): """ Raised when it is not possible to determine if an edge should be filtered. """
[docs] class SynapticConfigurationException(ConfigurationException): """ Raised when the synaptic manager fails for some reason. """
[docs] class SynapticBlockGenerationException(ConfigurationException): """ Raised when the synaptic manager fails to generate a synaptic block. """
[docs] class SynapticBlockReadException(ConfigurationException): """ Raised when the synaptic manager fails to read a synaptic block or convert it into readable values. """
[docs] class SynapticMaxIncomingAtomsSupportException(ConfigurationException): """ Raised when a synaptic sublist exceeds the max atoms possible to be supported. """
[docs] class DelayExtensionException(ConfigurationException): """ Raised when a delay extension vertex fails. """
[docs] class SpynnakerSplitterConfigurationException(ConfigurationException): """ Raised when a splitter configuration fails. """
[docs] class InvalidParameterType(SpynnakerException): """ Raised when a parameter is not recognised. """
[docs] class SynapseRowTooBigException(SpynnakerException): """ Raised when a synapse row is bigger than is allowed. """ def __init__(self, max_size, message): """ :param max_size: the maximum permitted size of row :param message: the exception message """ super().__init__(message) self._max_size = max_size @property def max_size(self): """ The maximum size allowed. """ return self._max_size