How to Display Exception In Grails? -


a have problem code. how can handle error service gsp? tried render service or controller, validation error occured during call save(): - field error in object 'talent.candidateprofile' on field 'core.db_email': rejected value []; codes full exception trace. sources:

 def create() {         [candidateprofileinstance: new candidateprofile(params)]     }      def save() {         def candidateprofileinstance = new candidateprofile(params)         if (!candidateprofileinstance.save(flush: true)) {             render(view: "create", model: [candidateprofileinstance: candidateprofileinstance])             return         }          flash.message = message(code: 'default.created.message', args: [message(code: 'candidateprofile.label', default: 'candidateprofile'), candidateprofileinstance.id])         redirect(action: "show", id: candidateprofileinstance.id)     } 

my .gsp page code

<div class="full-filed">             <h3>email address:</h3>         </div>         <div    class="fieldcontain ${haserrors(bean: candidateprofileinstance, field: 'core.db_email', 'error')} ">             <label for="core.db_email" class="error_message"> <g:message                     code="candidateprofile.core.db_email.label" default="dbemail" />             </label>         </div>         <g:textfield name="core.db_email" value="" class="logintxtbox" placeholder="email address" /> 

i want show user error, not full exception trace

form config.grooypage

//grails.gorm.failonerror = true

just comment line...so display custom error


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -