from bot.action.core.action import Action


class FailAction(Action):
    def process(self, event):
        raise NotARealError("simulated error")


class NotARealError(Exception):
    pass

from bot.action.core.action import Action


class FailAction(Action):
    def process(self, event):
        if event.command_args == "fatal":
            raise NotARealFatalError("simulated fatal error")
        raise NotARealError("simulated error")


class NotARealError(Exception):
    pass


class NotARealFatalError(BaseException):
    pass

Allow to simulate fatal errors
Allow to simulate fatal errors

  from bot.action.core.action import Action
  
  
  class FailAction(Action):
      def process(self, event):
+         if event.command_args == "fatal":
+             raise NotARealFatalError("simulated fatal error")
          raise NotARealError("simulated error")
  
  
  class NotARealError(Exception):
      pass
  
+ 
+ class NotARealFatalError(BaseException):
+     pass
+ 
Allow to simulate fatal errors
## Code Before:
from bot.action.core.action import Action


class FailAction(Action):
    def process(self, event):
        raise NotARealError("simulated error")


class NotARealError(Exception):
    pass

## Instruction:
Allow to simulate fatal errors
## Code After:
from bot.action.core.action import Action


class FailAction(Action):
    def process(self, event):
        if event.command_args == "fatal":
            raise NotARealFatalError("simulated fatal error")
        raise NotARealError("simulated error")


class NotARealError(Exception):
    pass


class NotARealFatalError(BaseException):
    pass
