public function register($theDebug = false, $theErrorTypes = null)
  {
    // PHP 5.6 set default value with expression.
    if ($theErrorTypes===null)
    {
      $theErrorTypes = E_ALL | E_STRICT;
    }

    $this->myDebug = $theDebug;

    ini_set('display_errors', false);
    set_exception_handler([$this, 'handleException']);
    set_error_handler([$this, 'handleError'], $theErrorTypes);
  }