You should catch all possible exceptions and put content of those exceptions into messages list. Plugin status should be: "error".