dolphindb 2.0.1032 → 2.0.1033
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/browser.js +6 -0
- package/browser.js.map +1 -1
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/browser.js
CHANGED
|
@@ -2721,6 +2721,12 @@ export class DDB {
|
|
|
2721
2721
|
const i_topic_end = buffer.indexOf(0, 17);
|
|
2722
2722
|
// 首个 message 一定是 table schema, 后续消息是 column 片段组成的 any vector
|
|
2723
2723
|
const data = DdbObj.parse(buffer.subarray(i_topic_end + 1), this.le);
|
|
2724
|
+
// server 推数据时遇到错误会返回 string,一般格式为 error.xxx: 错误信息
|
|
2725
|
+
if (data.form === DdbForm.scalar && data.type === DdbType.string) {
|
|
2726
|
+
this.disconnect();
|
|
2727
|
+
const value = data.value;
|
|
2728
|
+
throw new Error(value.slice(value.indexOf(':') + 1).trim());
|
|
2729
|
+
}
|
|
2724
2730
|
if (!schema) {
|
|
2725
2731
|
schema = data;
|
|
2726
2732
|
return;
|