Powered by SmartDoc

Handling session errors

To process for handling session errors, override CKApplication#handle_session_errorand return a component to display. The hook method is called when errors for timeout or authorization are raised.

class CKApplication
  def handle_error( error )
    if error.class == CKApplication::SessionTimeoutError then
      # ... code for timeout
    elsif error.class == CKApplication::SessionAuthorizationError then
      # ... code for authorizaion error
    end

    error_page       = page @error_page
    error_page.error = error
    error_page.debug = @debug
    error_page
  end
end