errorScreen

errorScreen

Description

This property specifies how the Error Screen is displayed when Profound.js shows an error message. It is provided as an object with the following configuration properties.

Properties

  • type - There are three possible types:

    • "production" - No error stack is shown;

    • "development" - A brief copy of the error stack is shown;

    • "development-advanced" - An interactive error stack is shown, allowing you to select each stack entry to see the relevant code and jump into an editor to change it.

  • editor - Specifies the IDE or editor to link to when using the interactive error stack. The editor URL can use the following replacement variables:

    • $file - The full path to the file containing the code where the error occurred;

    • $line - The line number where the error occurred;

    • $column - The column number where the error occurred.

The editor value can also be given as one of these shortcuts:

  • "vscode" - Translates to vscode://file/$file:$line:$column;

  • "pjs" - Translates to http://localhost:8081/ide/?ifsFile=$file&line=$line&column=$column.

Use "production" on production instances so that stack details are not shown to end users. See also displayErrors.

Example

On a development instance, show the interactive stack and open the selected frame directly in Visual Studio Code:

Example configuration
errorScreen: { type: "development-advanced", editor: "vscode" }

Interactive Error Stack at Run Time

For information on how to modify this setting, see Configuration File.