Still.Compiler.ErrorCache (Still v0.8.0) View Source

Saves an error occurring within a file's compilation and allows them to be retrieved for a prettified display.

Since files are compiled asynchronously, the browser (or other interested parties) require a centralised access to compilation errors.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Clears the errors for all files. This function is dangerous and should be only used for debugging and testing purposes.

Clears the saved errors for the given input file.

Retrieve all saved errors, for all files.

Save the given error or clear it if the compilation was successful.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Clears the errors for all files. This function is dangerous and should be only used for debugging and testing purposes.

Clears the saved errors for the given input file.

Retrieve all saved errors, for all files.

Save the given error or clear it if the compilation was successful.

If result is {:ok, source_file}, the error cache for the given file is cleared. Otherwise it is updated.