CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.4 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.4
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
      • Validator
    • Network
      • Email
      • Http
    • Routing
      • Filter
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper

Classes

  • ConsoleErrorHandler
  • ConsoleInput
  • ConsoleInputArgument
  • ConsoleInputOption
  • ConsoleInputSubcommand
  • ConsoleOptionParser
  • ConsoleOutput
  • HelpFormatter
  • Shell
  • ShellDispatcher
  • TaskCollection

Class ConsoleErrorHandler

Error Handler for Cake console. Does simple printing of the exception that occurred and the stack trace of the error.

Package: Cake\Console
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Console/ConsoleErrorHandler.php

Properties summary

  • $stderr public static
    ConsoleOutput
    Standard error stream.

Method Summary

  • _stop() protected
    Wrapper for exit(), used for testing.
  • getStderr() public static
    Get the stderr object for the console error handling.
  • handleError() public

    Handle errors in the console environment. Writes errors to stderr, and logs messages if Configure::read('debug') is 0.

  • handleException() public
    Handle a exception in the console environment. Prints a message to stderr.

Method Detail

_stop() protected ¶

_stop( integer $code = 0 )

Wrapper for exit(), used for testing.

Parameters
integer $code optional 0
The exit code.

getStderr() public static ¶

getStderr( )

Get the stderr object for the console error handling.

Returns
ConsoleOutput

handleError() public ¶

handleError( integer $code , string $description , string $file = null , integer $line = null , array $context = null )

Handle errors in the console environment. Writes errors to stderr, and logs messages if Configure::read('debug') is 0.

Parameters
integer $code
Error code
string $description
Description of the error.
string $file optional null
The file the error occurred in.
integer $line optional null
The line the error occurred on.
array $context optional null
The backtrace of the error.

handleException() public ¶

handleException( Exception $exception )

Handle a exception in the console environment. Prints a message to stderr.

Parameters
Exception $exception
The exception to handle

Properties detail

$stderr ¶

public static ConsoleOutput

Standard error stream.

OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs