-- ============================================================ -- noerrinfo() skip() onerror(continue/break) 测试 -- ============================================================ -- 1. noerrinfo() - 出错时不输出错误信息 insert into /test/aaa/non_exist_xxx (name) values ('noerrinfo test') /** noerrinfo() onerror(continue,'not exist','not find','not found') **/ ; -- 2. skip() - 跳过本语句(不执行) insert into /test/aaa/test_ext (e_name, e_value) values ('should_be_skipped', 999) /** skip() **/ ; -- 验证 skip() 的语句未执行 select e_name from /test/aaa/test_ext where e_name='should_be_skipped' /** output() count(0) **/ ; -- 3. onerror(continue) - 出错时忽略错误,继续执行 insert into /test/aaa/non_exist_xxx_continue (name) values ('continue test') /** onerror(continue,'not exist','not find','not found') **/ ; -- 验证错误被忽略后,后续语句继续执行 select count(*) from /test/aaa/test_ext /** output() **/ ; -- 4. onerror(break) - 出错时中断循环(配合 loop 使用) insert into /test/aaa/non_exist_class_break (e_name) values ('break_test') /** scope(mql) loop(3) onerror(break) noerrinfo() **/ ;