public static function getOriginalExceptionFileAndLineNumber(\Exception $e)
    {
        $names = array();

        do {
            // Keep track of the "previous" exception in the list. Once $e equals NULL
            // we want to return the values of $p which at the point contains the
            // previous execption.
            $p = $e;

            $names[] = get_class($e);
        } while (($e = $e->getPrevious()) !== null);

        return array( $p->getFile(), $p->getLine(), $p->getTraceAsString() );
    }