Skip to content

Commit

Permalink
throw exception if controller class is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
norbertlaposa committed Mar 9, 2016
1 parent 28627f4 commit a0bcbae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion controller.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (c) 2005-2015 Onxshop Ltd (https://onxshop.com)
* Copyright (c) 2005-2016 Onxshop Ltd (https://onxshop.com)
* Licensed under the New BSD License. See the file LICENSE.txt for details.
*
*/
Expand Down Expand Up @@ -801,7 +801,11 @@ public static function createController($request, &$subOnxshop = false) {
$classname = self::_prepareCallBack($request);

if (!class_exists($classname)) {

echo "missing $classname in $request";

throw new ErrorException("Missing $classname in $request");

return false;
}

Expand Down

0 comments on commit a0bcbae

Please sign in to comment.