Commit c309a434 authored by Medicean's avatar Medicean

Update(Modules/Database): 优化出错提示

parent 6398e8e8
...@@ -2,6 +2,16 @@ ...@@ -2,6 +2,16 @@
> 有空会补补BUG、添添新功能。 > 有空会补补BUG、添添新功能。
> 同时也欢迎大家的参与!感谢各位朋友的支持! .TAT. > 同时也欢迎大家的参与!感谢各位朋友的支持! .TAT.
## `v(2.1.12)`
### 核心
* 修复 JSP Shell 无法执行 update/delete/insert 语句问题
## 数据管理
* 优化出错提示
## 2021/03/27 `v(2.1.11.1)` ## 2021/03/27 `v(2.1.11.1)`
### 核心 ### 核心
......
...@@ -532,6 +532,9 @@ class CUSTOM { ...@@ -532,6 +532,9 @@ class CUSTOM {
})) }))
.then((res) => { .then((res) => {
let ret = res['text']; let ret = res['text'];
if (ret.indexOf("ERROR://") > -1) {
throw ret;
}
const arr = ret.split('\t'); const arr = ret.split('\t');
if (arr.length === 1 && ret === '') { if (arr.length === 1 && ret === '') {
toastr.warning(LANG['result']['warning'], LANG_T['warning']) toastr.warning(LANG['result']['warning'], LANG_T['warning'])
...@@ -589,6 +592,9 @@ class CUSTOM { ...@@ -589,6 +592,9 @@ class CUSTOM {
})) }))
.then((res) => { .then((res) => {
let ret = res['text']; let ret = res['text'];
if (ret.indexOf("ERROR://") > -1) {
throw ret;
}
const arr = ret.split('\t'); const arr = ret.split('\t');
const _db = Buffer.from(db).toString('base64'); const _db = Buffer.from(db).toString('base64');
// 删除子节点 // 删除子节点
...@@ -644,6 +650,9 @@ class CUSTOM { ...@@ -644,6 +650,9 @@ class CUSTOM {
})) }))
.then((res) => { .then((res) => {
let ret = res['text']; let ret = res['text'];
if (ret.indexOf("ERROR://") > -1) {
throw ret;
}
const arr = ret.split('\t'); const arr = ret.split('\t');
const _db = Buffer const _db = Buffer
.from(db) .from(db)
...@@ -710,6 +719,9 @@ class CUSTOM { ...@@ -710,6 +719,9 @@ class CUSTOM {
})) }))
.then((res) => { .then((res) => {
let ret = res['text']; let ret = res['text'];
if (ret.indexOf("ERROR://") > -1) {
throw ret;
}
// 更新执行结果 // 更新执行结果
this.updateResult(ret); this.updateResult(ret);
this this
......
...@@ -592,6 +592,9 @@ class JSP { ...@@ -592,6 +592,9 @@ class JSP {
})) }))
.then((res) => { .then((res) => {
let ret = res['text']; let ret = res['text'];
if (ret.indexOf("ERROR://") > -1) {
throw ret;
}
const arr = ret.split('\t'); const arr = ret.split('\t');
const _db = Buffer.from(db).toString('base64'); const _db = Buffer.from(db).toString('base64');
// 删除子节点 // 删除子节点
...@@ -647,6 +650,9 @@ class JSP { ...@@ -647,6 +650,9 @@ class JSP {
})) }))
.then((res) => { .then((res) => {
let ret = res['text']; let ret = res['text'];
if (ret.indexOf("ERROR://") > -1) {
throw ret;
}
const arr = ret.split('\t'); const arr = ret.split('\t');
const _db = Buffer const _db = Buffer
.from(db) .from(db)
...@@ -713,6 +719,9 @@ class JSP { ...@@ -713,6 +719,9 @@ class JSP {
})) }))
.then((res) => { .then((res) => {
let ret = res['text']; let ret = res['text'];
if (ret.indexOf("ERROR://") > -1) {
throw ret;
}
// 更新执行结果 // 更新执行结果
this.updateResult(ret); this.updateResult(ret);
this this
......
...@@ -1553,6 +1553,9 @@ class PHP { ...@@ -1553,6 +1553,9 @@ class PHP {
}) })
).then((res) => { ).then((res) => {
let ret = res['text']; let ret = res['text'];
if (ret.indexOf("ERROR://") > -1) {
throw ret;
}
// 更新执行结果 // 更新执行结果
this.updateResult(ret); this.updateResult(ret);
this.manager.query.layout.progressOff(); this.manager.query.layout.progressOff();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment