mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
remove unnecessary try catch
This commit is contained in:
parent
116876263e
commit
6ca2d7b1dc
@ -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
|
||||
|
||||
10
src/index.js
10
src/index.js
@ -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();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user