remove unnecessary try catch

This commit is contained in:
lichengyin 2015-08-29 13:54:16 +08:00
parent 116876263e
commit 6ca2d7b1dc
2 changed files with 4 additions and 12 deletions

View File

@ -135,11 +135,7 @@ export default class extends think.base {
//createServer callback
let callback = async (req, res) => {
let http = await think.http(req, res);
try{
return new this(http).run();
}catch(e){
think.log(e);
}
return new this(http).run();
};
let server;
//define createServer in application

View File

@ -398,12 +398,8 @@ export default class {
* run
* @return {} []
*/
async run(){
try{
this.start();
await think.require('app').run();
}catch(err){
think.log(err);
}
run(){
this.start();
return think.require('app').run();
}
}