function stopError($errMsg) { global $view; if (!is_object($view)) { $view = new bwView(); } $view->haltWithError($errMsg); }