# R26276 - /trunk/phpgwapi/inc/class.egw\_exception.inc.php

**URL:** <http://discourse.egroupware.org/t/r26276-trunk-phpgwapi-inc-class-egw-exception-inc-php/28144>\
**Category:** eGW-svn\
**Created:** [October 26, 2008, 11:05am UTC](http://discourse.egroupware.org/t/r26276-trunk-phpgwapi-inc-class-egw-exception-inc-php/28144 "2008-10-26T11:05:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ralf\_Becker\_6](http://discourse.egroupware.org/user_avatar/discourse.egroupware.org/ralf_becker_6/32/1306_2.png) [@Ralf\_Becker\_6](http://discourse.egroupware.org/u/Ralf_Becker_6)\
**Post date:** [October 26, 2008, 11:05am UTC](http://discourse.egroupware.org/t/r26276-trunk-phpgwapi-inc-class-egw-exception-inc-php/28144/1 "2008-10-26T11:05:30Z")

</div>

Author: ralfbecker  
New Revision: 26276

URL: [http://www.egroupware.org/viewvc?rev=3D26276&view=3Drev](http://www.egroupware.org/viewvc?rev=3D26276&view=3Drev)  
Log:  
“removed html tag from exception message, as they should work independent o=  
f the web gui”

Modified:  
trunk/phpgwapi/inc/class.egw\_exception.inc.php

Modified: trunk/phpgwapi/inc/class.egw\_exception.inc.php  
URL: [http://www.egroupware.org/viewvc/trunk/phpgwapi/inc/class.egw\_exceptio=](http://www.egroupware.org/viewvc/trunk/phpgwapi/inc/class.egw_exceptio=)  
n.inc.php?rev=3D26276&r1=3D26275&r2=3D26276&view=3Ddiff  
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=  
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=  
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=  
=3D=3D=3D  
— trunk/phpgwapi/inc/class.egw\_exception.inc.php (original)  
+++ trunk/phpgwapi/inc/class.egw\_exception.inc.php Sun Oct 26 12:05:30 2008  
@@ -1,11 +1,11 @@

 \<?php /\*\* \* eGroupWare API - Exceptions - \* = + \* \* This file defines as set of Exceptions used in eGroupWare. - \* = + \* \* Applications having the need for further exceptions should extends the = from one defined in this file. - \* = + \* \* @link http://www.egroupware.org \* @author Ralf Becker \* @license http://opensource.org/licenses/gpl-license.php GPL - GNU Gener= al Public License @@ -17,10 +17,10 @@ = /\*\* \* eGroupWare API - Exceptions - \* = + \* \* All eGroupWare exceptions should extended this class, so we are able to= eg. add some logging later. - \* = - \* The messages for most exceptions should be translated and ready to be d= isplayed to the user. = + \* + \* The messages for most exceptions should be translated and ready to be d= isplayed to the user. \* Only exception to this are exceptions like egw\_exception\_assertion\_fail= s, egw\_exception\_wrong\_parameter \* or egw\_exception\_db, which are suppost to happen only during program de= velopment. \*/ @@ -30,10 +30,10 @@ } = /\*\* - \* Base class for all exceptions about missing permissions = + \* Base class for all exceptions about missing permissions \* \*/ -class egw\_exception\_no\_permission extends egw\_exception = +class egw\_exception\_no\_permission extends egw\_exception { /\*\* \* Constructor @@ -44,7 +44,7 @@ function \_\_construct($msg=3Dnull,$code=3D100) { if (is\_null($msg)) $msg =3D lang('Permisson denied!'); - = + parent::\_\_construct($msg,$code); } } @@ -53,7 +53,7 @@ \* User lacks the right to run an application \* \*/ -class egw\_exception\_no\_permission\_app extends egw\_exception\_no\_permission = +class egw\_exception\_no\_permission\_app extends egw\_exception\_no\_permission { function \_\_construct($msg=3Dnull,$code=3D101) { @@ -66,11 +66,11 @@ else { $currentapp =3D $GLOBALS['egw\_info']['flags']['currentapp']; - $app =3D isset($GLOBALS['egw\_info']['apps'][$currentapp]['title']) ? = + $app =3D isset($GLOBALS['egw\_info']['apps'][$currentapp]['title']) ? $GLOBALS['egw\_info']['apps'][$currentapp]['title'] : $msg; = - $msg =3D lang('You\'ve tried to open the eGroupWare application: %1, b= ut you have no permission to access this application.', = - '_'.$app.'_'); + $msg =3D lang('You\'ve tried to open the eGroupWare application: %1, b= ut you have no permission to access this application.', + '"'.$app.'"'); } } parent::\_\_construct($msg,$code); @@ -81,12 +81,12 @@ \* User is no eGroupWare admin (no right to run the admin application) \* \*/ -class egw\_exception\_no\_permission\_admin extends egw\_exception\_no\_permissio= n\_app = +class egw\_exception\_no\_permission\_admin extends egw\_exception\_no\_permissio= n\_app { function \_\_construct($msg=3Dnull,$code=3D102) { if (is\_null($msg)) $msg =3D 'admin'; - = + parent::\_\_construct($msg,$code); } } @@ -112,7 +112,7 @@ function \_\_construct($msg=3Dnull,$code=3D2) { if (is\_null($msg)) $msg =3D lang('Entry not found!'); - = + parent::\_\_construct($msg,$code); } } @@ -141,8 +141,8 @@ \* Exceptions thrown by the egw\_db class \* \*/ -class egw\_exception\_db extends egw\_exception = -{ = +class egw\_exception\_db extends egw\_exception +{ /\*\* \* Constructor \* @@ -152,9 +152,9 @@ function \_\_construct($msg=3Dnull,$code=3D100) { $this-\>query =3D $query; - = + if (is\_null($msg)) $msg =3D lang('Database error!'); - = + parent::\_\_construct($msg,$code); } } ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner\_id=100&url=/ \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ eGroupWare-cvs mailing list eGroupWare-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/egroupware-cvs
