SetFailureImage
Prev | PHPlot Function Reference | Next

## SetFailureImage

SetFailureImage — Enable or disable error image production on failure

## Synopsis

    $plot->SetFailureImage($error_image)

## Description

`SetFailureImage` can be used to disable the error image normally produced by PHPlot if a fatal error occurs.

## Parameters

`$error_image`

  True to enable the error image, False to disable the error image.

## Notes

See Section 3.9, “Error Handling” for an overview of error handling in PHPlot. The error image is enabled by default.

If failure occurs when error images are disabled, PHPlot will still trigger a user-level error condition, which will normally log the error to the server log and terminate the script. However, there will be no feedback to the user that the error occurred.

`SetFailureImage(False)` should be called right after creating the PHPlot object if using EncodeImage to return the image as a string (rather than output the image). This will make sure that no unexpected error image is produced by a script that would not normally produce an image at all.

## History

This function was added in PHPlot-5.5.0.

Prev | Up | Next
SetErrorBarSize | Home | SetFileFormat