@less-is-more/less-js 1.4.18 → 1.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/param.js +1 -1
- package/src/router.js +5 -1
package/package.json
CHANGED
package/src/param.js
CHANGED
package/src/router.js
CHANGED
|
@@ -49,7 +49,11 @@ module.exports = class Router {
|
|
|
49
49
|
// controller方法有返回值的自动send
|
|
50
50
|
this._handleReturn(result, startTime, req, res);
|
|
51
51
|
} catch (e) {
|
|
52
|
-
|
|
52
|
+
if (e instanceof Error) {
|
|
53
|
+
return this._sendError(e.message ? e.message : "出错啦", res, true);
|
|
54
|
+
} else {
|
|
55
|
+
return this._sendError(e, res, false);
|
|
56
|
+
}
|
|
53
57
|
}
|
|
54
58
|
} else {
|
|
55
59
|
return this._sendError("请输入正确方法", res);
|