Changeset 30074
- Timestamp:
- 02/12/08 15:33:17 (9 months ago)
- 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 182 182 } catch (Throwable t) { 183 183 log.error(t); 184 //Rux INA-224 simple patch for the moment, until full i18n into Exceptions185 184 return TRANSF_ERROR + " |(" + fullName + ")| " 186 + resourcesAccessor.getMessages().get("message.operation.fails.generic");185 + t.getLocalizedMessage(); 187 186 } 188 187 } … … 213 212 } catch (FileManagerPermissionException e) { 214 213 // 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) { 217 218 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"; 226 220 } 227 221 … … 236 230 return createdDoc.getName(); 237 231 } 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); 242 233 } 243 234 } … … 260 251 return createdDoc.getName(); 261 252 } 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); 266 254 } 267 255 } … … 283 271 documentManager, fullName, path); 284 272 } 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) { 287 277 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"; 296 279 } 297 280 … … 301 284 return createdDoc.getName(); 302 285 } 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(); 307 288 } 308 289 } … … 323 304 return debug; 324 305 } 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(); 329 307 } 330 308 } … … 467 445 return debug; 468 446 } 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(); 473 448 } 474 449 } … … 491 466 return debug; 492 467 } 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(); 497 469 } 498 470 } … … 515 487 return debug; 516 488 } 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(); 521 490 } 522 491 }
