Commit 43c16f1b authored by Joel Collins's avatar Joel Collins
Browse files

Added an extension that literally just raises an exception

parent efac711d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
from .raiser import raiser_extension_v2
 No newline at end of file
+14 −0
Original line number Diff line number Diff line
from labthings.server.extensions import BaseExtension
from labthings.server.view import ActionView

class RaiseException(ActionView):
    def post(self):
        raise Exception("The developer raised an exception")

raiser_extension_v2 = BaseExtension(
    "org.openflexure.dev.raiser",
    version="0.1.0",
    description="Actions to cause various traumatic events in the microscope, used for testing.",
)

raiser_extension_v2.add_view(RaiseException, "/raise")
 No newline at end of file