Uploaded image for project: 'Instrument control development'
  1. Instrument control development
  2. INSTRM-1327

Add FatalActorError exception in actorcore.

    XMLWordPrintable

    Details

      Description

      I propose that we consider creating a new FatalActorError exception to be raised when an actor wants to bail out, with the expectation that any live command will be failed. The intent is to codify how to provide clean errors to humans and to be passed back to Gen2, as well as to give a standard mechanism for saving and restoring failure details.

      On raise (well on FatalActorError("nice string for a human", cmd=cmd creation, it would grab interesting state. I can imagine adding subclasses for MHS/IO/etc problems, which would add semi-structured info.

      On being handled by the top-level Command handler, a nice one-line summary would be generated on the final message. Probably with a dedicated keyword, e.g.: {{cmd.fail('fatalError=

      {nice_one_line_summary}

      ')}}. These can be picked up by the gen2Actor and fed back to Gen2 in a form which that side wants.

      Also, all gathered state and traceback info would be dumped to some file (oh, /data/logs/fatalErrors/$actorname/$timestamp.txt or something) which could be picked up later by those who care.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cloomis cloomis
                Reporter:
                cloomis cloomis
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: