Index: trunk/grails-app/controllers/AssetDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/AssetDetailedController.groovy	(revision 347)
+++ trunk/grails-app/controllers/AssetDetailedController.groovy	(revision 350)
@@ -232,20 +232,20 @@
     */
     def delete = {
-        def assetInstance = Asset.get( params.id )
-        if(assetInstance) {
-            try {
-                assetInstance.delete(flush:true)
-                flash.message = "Asset ${params.id} deleted"
-                redirect(action:search)
-            }
-            catch(org.springframework.dao.DataIntegrityViolationException e) {
-                flash.message = "Asset ${params.id} could not be deleted"
-                redirect(action:show,id:params.id)
-            }
-        }
-        else {
-            flash.message = "Asset not found with id ${params.id}"
-            redirect(action:search)
-        }
+        def result = assetService.delete(params)
+
+        if(!result.error) {
+            flash.message = g.message(code: "default.delete.success", args: ["Asset", params.id])
+            redirect(action:search)
+            return
+        }
+
+        flash.errorMessage = g.message(code: result.error.code, args: result.error.args)
+
+        if(result.error.code == "default.not.found") {
+            redirect(action:search)
+            return
+        }
+
+        redirect(action:show, id: params.id)
     }
 
