Browse Source

Merge pull request #1320 from dejangeci/feature/dbexception-inner

Added a getInner method for retrieving the inner exception
Taylor Otwell 12 years ago
parent
commit
d55328cc52
1 changed files with 10 additions and 0 deletions
  1. 10 0
      laravel/database/exception.php

+ 10 - 0
laravel/database/exception.php

@@ -24,6 +24,16 @@ class Exception extends \Exception {
 		$this->setMessage($sql, $bindings);
 	}
 
+	/**
+	 * Get the inner exception.
+	 *
+	 * @return Exception
+	 */
+	public function getInner()
+	{
+		return $this->inner;
+	}
+
 	/**
 	 * Set the exception message to include the SQL and bindings.
 	 *