Dotclear

Changeset 141:340bbc2cd9f4


Ignore:
Timestamp:
05/04/11 15:52:51 (14 years ago)
Author:
xave <xave@…>
Branch:
userprefs
Message:

Deported the error handling found in constructors. Now we can upgrade.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • admin/index.php

    r139 r141  
    4444 
    4545# Check dashboard module prefs 
    46 $core->auth->user_prefs->addWorkspace('dashboard'); 
     46 
     47 
     48 
    4749if (!$core->auth->user_prefs->dashboard->prefExists('doclinks')) { 
    4850     if (!$core->auth->user_prefs->dashboard->prefExists('doclinks',true)) { 
  • inc/core/class.dc.prefs.php

    r139 r141  
    4242          $this->table = $core->prefix.'pref'; 
    4343          $this->user_id =& $user_id; 
    44           $this->loadPrefs(); 
     44          try {$this->loadPrefs();} catch (Exception $e) { 
     45               if (version_compare($core->getVersion('core'),'2.3','>')) { 
     46                    trigger_error($e->getMessage()); 
     47               } 
     48          } 
    4549     } 
    4650      
     
    5963               $rs = $this->con->select($strReq); 
    6064          } catch (Exception $e) { 
    61                trigger_error(__('Unable to retrieve workspaces:').' '.$this->con->error(), E_USER_ERROR); 
     65               //~ trigger_error(__('Unable to retrieve workspaces:').' '.$this->con->error(), E_USER_ERROR); 
     66               //~ throw new Exception(__('Unable to retrieve workspaces:').' '.$this->con->error(), E_USER_ERROR); 
     67               throw $e; 
    6268          } 
    6369           
  • inc/core/class.dc.workspace.php

    r33 r141  
    4646          $this->user_id =& $user_id; 
    4747           
    48           $this->getPrefs($rs); 
     48          try {$this->getPrefs($rs);} catch (Exception $e) { 
     49               if (version_compare($core->getVersion('core'),'2.3','>')) { 
     50                    trigger_error($e->getMessage()); 
     51               } 
     52          } 
    4953     } 
    5054      
     
    6367                    $rs = $this->con->select($strReq); 
    6468               } catch (Exception $e) { 
    65                     trigger_error(__('Unable to retrieve prefs:').' '.$this->con->error(), E_USER_ERROR); 
     69                    //~ trigger_error(__('Unable to retrieve prefs:').' '.$this->con->error(), E_USER_ERROR); 
     70                    throw $e; 
    6671               } 
    6772          } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map