<?php

namespace Igniter\Flame\Exception;

use Config;
use Exception;
use October\Rain\Exception\ErrorHandler as OctoberErrorHandler;

/**
 * System Error Handler, this class handles application exception events.
 */
class ErrorHandler extends OctoberErrorHandler
{
    /**
     * Returns a more descriptive error message if application
     * debug mode is turned on.
     * @param Exception $exception
     * @return string
     */
    public static function getDetailedMessage($exception)
    {
        $message = $exception->getMessage();

        if (!($exception instanceof ApplicationException) && Config::get('app.debug', FALSE)) {
            $message = sprintf('"%s" on line %s of %s',
                $exception->getMessage(),
                $exception->getLine(),
                $exception->getFile()
            );

            $message .= $exception->getTraceAsString();
        }

        return $message;
    }
}
<?php

namespace Igniter\Flame\Exception;

use October\Rain\Exception\ErrorHandler as OctoberErrorHandler;

/**
 * System Error Handler, this class handles application exception events.
 */
class ErrorHandler extends OctoberErrorHandler
{
}
--- 
+++ 
@@ -2,6 +2,8 @@
 
 namespace Igniter\Flame\Exception;
 
+use Config;
+use Exception;
 use October\Rain\Exception\ErrorHandler as OctoberErrorHandler;
 
 /**
@@ -9,4 +11,26 @@
  */
 class ErrorHandler extends OctoberErrorHandler
 {
+    /**
+     * Returns a more descriptive error message if application
+     * debug mode is turned on.
+     * @param Exception $exception
+     * @return string
+     */
+    public static function getDetailedMessage($exception)
+    {
+        $message = $exception->getMessage();
+
+        if (!($exception instanceof ApplicationException) && Config::get('app.debug', FALSE)) {
+            $message = sprintf('"%s" on line %s of %s',
+                $exception->getMessage(),
+                $exception->getLine(),
+                $exception->getFile()
+            );
+
+            $message .= $exception->getTraceAsString();
+        }
+
+        return $message;
+    }
 }
Include exception trace string in detailed debug message
