Changeset 30074

Show
Ignore:
Timestamp:
02/12/08 15:33:17 (9 months ago)
Author:
rdarlea
Message:

Reverted 30070: wrong repository commit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.platform/tags/nuxeo-platform-5.1.3-GA/nuxeo-platform-webapp-core/src/main/java/org/nuxeo/ecm/webapp/filemanager/FileManageActionsBean.java

    r30070 r30074  
    182182        } catch (Throwable t) { 
    183183            log.error(t); 
    184             //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    185184            return TRANSF_ERROR + " |(" + fullName + ")| " 
    186                     + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     185                    + t.getLocalizedMessage(); 
    187186        } 
    188187    } 
     
    213212            } catch (FileManagerPermissionException e) { 
    214213                // security check failed 
    215                 //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    216                 log.error("No permissions creating " + fullName); 
     214                return TRANSF_ERROR + " |(" + fullName + ")| " + "no_right"; 
     215            } 
     216 
     217            if (createdDoc == null) { 
    217218                return TRANSF_ERROR + " |(" + fullName + ")| " 
    218                         + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
    219             } 
    220  
    221             if (createdDoc == null) { 
    222                 //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    223                 log.error("Couldn't create the document " + fullName); 
    224                 return TRANSF_ERROR + " |(" + fullName + ")| " 
    225                         + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     219                        + "wrong_document_type"; 
    226220            } 
    227221 
     
    236230            return createdDoc.getName(); 
    237231        } catch (Throwable t) { 
    238             //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    239             log.error(t); 
    240             return TRANSF_ERROR + " |(" + fullName + ")| " 
    241                     + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     232            throw EJBExceptionHandler.wrapException(t); 
    242233        } 
    243234    } 
     
    260251            return createdDoc.getName(); 
    261252        } catch (Throwable t) { 
    262             //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    263             log.error(t); 
    264             return TRANSF_ERROR + " |(" + fullName + ")| " 
    265                     + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     253            throw EJBExceptionHandler.wrapException(t); 
    266254        } 
    267255    } 
     
    283271                        documentManager, fullName, path); 
    284272            } catch (FileManagerPermissionException e) { 
    285                 //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    286                 log.error("No permissions creating folder " + fullName); 
     273                return TRANSF_ERROR + " |(" + fullName + ")| " + "no_right"; 
     274            } 
     275 
     276            if (createdDoc == null) { 
    287277                return TRANSF_ERROR + " |(" + fullName + ")| " 
    288                         + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
    289             } 
    290  
    291             if (createdDoc == null) { 
    292                 //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    293                 log.error("Couldn't create the folder " + fullName); 
    294                 return TRANSF_ERROR + " |(" + fullName + ")| " 
    295                         + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     278                        + "wrong_document_type"; 
    296279            } 
    297280 
     
    301284            return createdDoc.getName(); 
    302285        } catch (Throwable t) { 
    303             //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    304             log.error(t); 
    305             return TRANSF_ERROR + " |(" + fullName + ")| " 
    306                     + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     286            return TRANSF_ERROR + " | (" + fullName + ") | " 
     287                    + t.getLocalizedMessage(); 
    307288        } 
    308289    } 
     
    323304            return debug; 
    324305        } catch (Throwable t) { 
    325             //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    326             log.error(t); 
    327             return COPY_ERROR + " |(" + docId + ")| " 
    328                     + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     306            return COPY_ERROR + t.getLocalizedMessage(); 
    329307        } 
    330308    } 
     
    467445            return debug; 
    468446        } catch (Throwable t) { 
    469             //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    470             log.error(t); 
    471             return MOVE_ERROR + " |(" + docId + ")| " 
    472                     + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     447            return MOVE_ERROR + t.getLocalizedMessage(); 
    473448        } 
    474449    } 
     
    491466            return debug; 
    492467        } catch (Throwable t) { 
    493             //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    494             log.error(t); 
    495             return COPY_ERROR + " |(" + docId + ")| " 
    496                     + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     468            return COPY_ERROR + t.getLocalizedMessage(); 
    497469        } 
    498470    } 
     
    515487            return debug; 
    516488        } catch (Throwable t) { 
    517             //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    518             log.error(t); 
    519             return PASTE_ERROR + " |(" + docId + ")| " 
    520                     + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
     489            return PASTE_ERROR + t.getLocalizedMessage(); 
    521490        } 
    522491    }