{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":960,"path":"api-reference/server-api-reference/c_AutomationException.md","title":"AutomationException - Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# AutomationException- Global\n\nThe AutomationException script include provides generic exception wrapping for automation.\n\nInclude this in automation code to implement error handling.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## AutomationException - getMessage\\(\\)\n\nRetrieves the error message.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|The error message|\n\n```\nvar ae = new AutomationException(\"This is an error message\");\ngs.print(ae.getMessage());\n```\n\nOutput:\n\n```\nThis is an error message\n```\n\n"}}