-
Notifications
You must be signed in to change notification settings - Fork 459
DataWeaveErrorRecipes
pozil edited this page Nov 14, 2024
·
3 revisions
Demonstrates how to handle DataWeave script errors in Apex.
Group DataWeaveInApex Recipes
Runs a DataWeave script that triggers a runtime error on pupose.
Uses the dw/error.dwl
DataWeave script.
public static void runtimeError()
void
Attempts to output records as Excel.
This always results in an error as the Excel format is not supported in DataWeave in Apex.
Uses the dw/excelOutputError.dwl
DataWeave script.
public static DataWeave.Result convertContactsToExcel(List<Contact> contacts)
Name | Type | Description |
---|---|---|
contacts | List<Contact> | list of contacts |
DataWeave.Result
DataWeave script result (never used as a ,[object Object], is thrown)