Erl2ex v0.0.9 Erl2ex.Results

Erl2ex.Results defines the structure of result data returned from most functions in the Erl2ex module.

Summary

Types

t()

Overall results for an entire conversion job of one or more files

Functions

Returns the error that caused a conversion to fail, or nil if the conversion was successful. If more than one fatal error was detected, one error is returned but it is undefined which one is chosen

Returns true if the entire conversion was successful, meaning no file resulted in an error

If the conversion failed, throw the error that caused the failure. Otherwise return the results

Types

t :: %Erl2ex.Results{files: [Erl2ex.Results.File.t]}

Overall results for an entire conversion job of one or more files.

Functions

get_error(arg1)

Specs

get_error(Erl2ex.Results.t | Erl2ex.Results.File.t) ::
  %CompileError{__exception__: term, description: term, file: term, line: term} |
  nil

Returns the error that caused a conversion to fail, or nil if the conversion was successful. If more than one fatal error was detected, one error is returned but it is undefined which one is chosen.

success?(arg1)

Specs

success?(Erl2ex.Results.t | Erl2ex.Results.File.t) :: boolean

Returns true if the entire conversion was successful, meaning no file resulted in an error.

throw_error(results)

Specs

throw_error(a) :: a when a: Erl2ex.Results.t

If the conversion failed, throw the error that caused the failure. Otherwise return the results.