Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Last active October 7, 2019 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuzannamj/7697461b71f71685f99c864141161e6a to your computer and use it in GitHub Desktop.
Save zuzannamj/7697461b71f71685f99c864141161e6a to your computer and use it in GitHub Desktop.
<script runat="server">
Platform.Load("Core","1.1.1");
try{
</script>
%%[ your AMPscript block goes here ]%%
<script runat="server">
}
catch(e) {
Variable.SetValue("errorMessage", Stringify(e.message) + Stringify(e.description));
}
</script>
<script runat="client">
console.log(`%%=v(@errorMessage)=%%`);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment