Changeset 601


Ignore:
Timestamp:
Jun 23, 2010, 10:26:37 AM (9 years ago)
Author:
jahn
Message:

Added full stack trace to printing the exception documented in the bug tracker.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/query/QueryController.groovy

    r553 r601  
    22
    33import org.compass.core.engine.SearchEngineQueryParseException
     4import java.io.PrintWriter;
     5import java.io.StringWriter;
     6
    47
    58/*
     
    3740            try {
    3841                println params
    39                 render searchableService.search(params['bla'], type:"Term" )
    40             } catch( SearchEngineQueryParseException e) { println "SEQPE: " + e }
    41             catch( Exception e) { println e }
     42                render searchableService.search(params['bla'])
     43            } catch( SearchEngineQueryParseException e) { println "SEQPE: " + e.printStackTrace }
     44            catch( Exception ex) {
     45                                StringWriter sw = new StringWriter();
     46                                ex.printStackTrace(new PrintWriter(sw));
     47                                String stacktrace = sw.toString();
     48                                System.out.println("stacktrace = " + stacktrace);
     49                        }
    4250            render "test" 
    4351    }
Note: See TracChangeset for help on using the changeset viewer.