refactor AnsibleMessageParser for nesting try