Пример #1
0
 function testControllerAndAction()
 {
     Exceptional::$controller = "home";
     Exceptional::$action = "index";
     $this->createExceptionData();
     $this->assertEquals($this->request["controller"], "home");
     $this->assertEquals($this->request["action"], "index");
 }
Пример #2
0
<?php

// setup Exceptional with the following two lines
require dirname(__FILE__) . "/../exceptional.php";
Exceptional::setup("YOUR-API-KEY");
// control which errors are caught with error_reporting
error_reporting(E_ALL);
// start testing
$math = 1 / 0;
Пример #3
0
 static function proxy($host, $port)
 {
     self::$proxy_host = $host;
     self::$proxy_port = $port;
 }
Пример #4
0
function my_exception_handler($exception)
{
    echo "Exception thrown: " . $exception->getMessage() . "\n";
}
set_exception_handler("my_exception_handler");
// setup Exceptional with the following two lines
// this code must come **after** you set custom error/exception handlers
require dirname(__FILE__) . "/../exceptional.php";
Exceptional::setup("YOUR-API-KEY", true);
// use ssl
// add controller and action
Exceptional::$controller = "welcome";
Exceptional::$action = "index";
// add context
$context = array("user_id" => 1);
Exceptional::context($context);
// control which errors are caught with error_reporting
error_reporting(E_ALL | E_STRICT);
// start testing
echo $hi;
$math = 1 / 0;
function backtrace($i)
{
    if ($i < 6) {
        return backtrace($i + 1);
    }
    echo $cool;
}
backtrace(0);
function change(&$var)
{
Пример #5
0
 static function clear()
 {
     self::$context = array();
 }