Changeset 30070

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

INA-224: generic message popup for any error in the file manipulation.

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

    r28596 r30070  
    182182        } catch (Throwable t) { 
    183183            log.error(t); 
     184            //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
    184185            return TRANSF_ERROR + " |(" + fullName + ")| " 
    185                     + t.getLocalizedMessage(); 
     186                    + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
    186187        } 
    187188    } 
     
    212213            } catch (FileManagerPermissionException e) { 
    213214                // security check failed 
    214                 return TRANSF_ERROR + " |(" + fullName + ")| " + "no_right"; 
     215                //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
     216                log.error("No permissions creating " + fullName); 
     217                return TRANSF_ERROR + " |(" + fullName + ")| " 
     218                        + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
    215219            } 
    216220 
    217221            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); 
    218224                return TRANSF_ERROR + " |(" + fullName + ")| " 
    219                         + "wrong_document_type"
     225                        + resourcesAccessor.getMessages().get("message.operation.fails.generic")
    220226            } 
    221227 
     
    230236            return createdDoc.getName(); 
    231237        } catch (Throwable t) { 
    232             throw EJBExceptionHandler.wrapException(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"); 
    233242        } 
    234243    } 
     
    251260            return createdDoc.getName(); 
    252261        } catch (Throwable t) { 
    253             throw EJBExceptionHandler.wrapException(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"); 
    254266        } 
    255267    } 
     
    271283                        documentManager, fullName, path); 
    272284            } catch (FileManagerPermissionException e) { 
    273                 return TRANSF_ERROR + " |(" + fullName + ")| " + "no_right"; 
     285                //Rux INA-224 simple patch for the moment, until full i18n into Exceptions 
     286                log.error("No permissions creating folder " + fullName); 
     287                return TRANSF_ERROR + " |(" + fullName + ")| " 
     288                        + resourcesAccessor.getMessages().get("message.operation.fails.generic"); 
    274289            } 
    275290 
    276291            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); 
    277294                return TRANSF_ERROR + " |(" + fullName + ")| " 
    278                         + "wrong_document_type"
     295                        + resourcesAccessor.getMessages().get("message.operation.fails.generic")
    279296            } 
    280297 
     
    284301            return createdDoc.getName(); 
    285302        } catch (Throwable t) { 
    286             return TRANSF_ERROR + " | (" + fullName + ") | " 
    287                     + t.getLocalizedMessage(); 
     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"); 
    288307        } 
    289308    } 
     
    304323            return debug; 
    305324        } catch (Throwable t) { 
    306             return COPY_ERROR + t.getLocalizedMessage(); 
     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"); 
    307329        } 
    308330    } 
     
    445467            return debug; 
    446468        } catch (Throwable t) { 
    447             return MOVE_ERROR + t.getLocalizedMessage(); 
     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"); 
    448473        } 
    449474    } 
     
    466491            return debug; 
    467492        } catch (Throwable t) { 
    468             return COPY_ERROR + t.getLocalizedMessage(); 
     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"); 
    469497        } 
    470498    } 
     
    487515            return debug; 
    488516        } catch (Throwable t) { 
    489             return PASTE_ERROR + t.getLocalizedMessage(); 
     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"); 
    490521        } 
    491522    }