static public function cThrow($message = null, \Exception $exception = null, $config = null)
    {

        if (!isset ($config ['display'])) {
            $config ['display'] = self::$displayTrace;
        }

        if (!isset ($config ['send'])) {
            $config ['send'] = self::$sendTrace;
        }

        if (!isset ($config ['write'])) {
            $config ['write'] = self::$writeTrace;
        }

        $retVal = '';

        if (empty ($message)) {
            $message = self::$standardErrorText;
        }

        $retVal .= self::displayBox($message);

        /**
         * if exception has been sent, try to display or send it
         */
        if (!empty ($exception)) {

            $errorFullText = self::formatExceptionMessage($exception);

            if ($config ['display']) {
                $retVal .= self::formatError($errorFullText);
            }

            if ($config ['send']) {
                self::send($errorFullText);
            }

            if ($config ['write']) {
                self::write($errorFullText);
            }

        }

        return $retVal;
    }