Class Fusioncharts::Exporter::FcError
In: lib/fusioncharts/exporter/fc_error.rb
Parent: Object

Class to hold the errors and warnings. The error code is stored in a string and warning codes are stored in an array. Contains methods to add warning or set error code. Also contains methods to access the warning codes, error code, warning messages, error message and methods to convert the errors and warnings to other formats like query string or html.

Methods

Attributes

err_code  [R]  Error code
warn_codes  [R]  Warning codes.

Public Class methods

Gets the error message for a particular code, returns nil if not found

Initialize with a error code and an array of warnings.

  • parameter ierror_code : The error code string
  • parameter iw_codes : The array of warnings. (Optional)

Gets the warning message for a particular code, returns nil if not found

Public Instance methods

Adds a warning to this FcError.

  • parameter warning_code : The code to be added

Gets the error message for a particular code, returns nil if not found

Whether there is no error code for this FcError.

Converts the error to html format. If there is an error, then adds successful status message and statusCode as 1. Else, sets the statusMessage as the error message and statusCode as 0.

Converts the error to QueryString. If there is an error, then adds successful status message and statusCode as 1. Else, sets the statusMessage as the error message and statusCode as 0.

Returns the error code for this FcError.

Whether there are no warnings for this FcError.

Sets the error code for this FcError.

  • parameter ierror_code : The error code to be set.

Converts the FcError to html.

Converts the FcError to QueryString.

Returns the array of warning codes for this FcError.

Returns the string of warning messages for this FcError.

Converts the warnings to html format. Returns a string starting with "<br>notice="

Converts the warnings to query string format. Returns a string starting with "&notice="

[Validate]