Changeset ea1ac253acd3a04e25eff3bef4e2b888430eee2b

Show
Ignore:
Timestamp:
05/12/08 12:15:25 (2 months ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1210587325 +0200
git-parent:

[47cd40b25bcf0af9685388fb11a88e17704eb4ad]

git-author:
Christopher Jung <bktheg@web.de> 1210587325 +0200
Message:

[bug] Fehlerbehandlung bei Adminplugins gefixt. Exceptions fuehren nun auch zu einem Rollback

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/net/driftingsouls/ds2/server/modules/AdminController.java

    r953ed23 rea1ac25  
    6161                 
    6262                @Override 
    63                 public boolean equals(Object object) 
    64                 { 
    65                         if(object == null) 
    66                         { 
     63                public boolean equals(Object object) { 
     64                        if(object == null) { 
    6765                                return false; 
    6866                        } 
    6967                         
    70                         if(object.getClass() != this.getClass()) 
    71                         { 
     68                        if(object.getClass() != this.getClass()) { 
    7269                                return false; 
    7370                        } 
     
    7572                        MenuEntry other = (MenuEntry) object; 
    7673                        return this.name.equals(other.name); 
     74                } 
     75                 
     76                @Override 
     77                public int hashCode() { 
     78                        return this.name.hashCode(); 
    7779                } 
    7880        } 
     
    237239                        plugin.output(this, page, act); 
    238240                } 
    239                 catch( Exception e ) { 
     241                catch( RuntimeException e ) { 
     242                        addError("Fehler beim Aufruf des Admin-Plugins: "+e); 
     243                         
     244                        throw e; 
     245                } 
     246                catch( InstantiationException e ) { 
     247                        addError("Fehler beim Aufruf des Admin-Plugins: "+e); 
     248                        e.printStackTrace(); 
     249                } 
     250                catch( IllegalAccessException e ) { 
    240251                        addError("Fehler beim Aufruf des Admin-Plugins: "+e); 
    241252                        e.printStackTrace();