sql server - How to return Sql error in Java SpringRestful WebService? -


how handle error sql error in java springrestful webservice? read arround internet can return httprequest error. if want return error sql?

here :

    @requestmapping(value = "/dynamicurl/{sp}/**", method = requestmethod.get,headers="accept=application/json")     public string dynamicurl(@pathvariable("sp") string sp, httpservletrequest request) throws parseexception {         string strparam="exec myglorystoredprocedure";         try {             userservice.dynamicurl(strparam);         } catch (exception e) {             // todo auto-generated catch block             e.printstacktrace();             err = e.getmessage();             throw new runtimeexception(e);         }          return err;     } 

when trying generate error entering wrong stored procedure name, should give me "could not find stored procedure 'myglorystoredprocedure'." in console didn't return anything, when execute webservice, via web browser.. blank page. how return sql error properly?


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -