| 1234567891011121314151617181920212223242526272829303132333435363738 |
- -- ============================================================
- -- onerror(continue, must, exit) 各种错误处理测试
- -- ============================================================
- -- 1. onerror(continue) - 忽略错误继续执行
- insert into /test/aaa/non_exist_class (name) values ('test')
- /**
- onerror(continue,'not exist','not find','not found')
- **/
- ;
- -- 2. onerror(continue) - 忽略重复插入错误
- insert into /test/aaa/test_ext (e_name, e_value) values ('ext_001', 1)
- /**
- onerror(continue)
- **/
- ;
- -- 3. onerror(continue) - 忽略多个错误关键词
- select * from /test/aaa/no_such_class_222 where x=1
- /**
- onerror(continue,'not exist','not find','not found','no such','cannot')
- **/
- ;
- -- 4. onerror(continue) - 空参数,忽略所有错误
- insert into /test/aaa/test_ext (e_name) values ('onerror_all')
- /**
- onerror(continue)
- **/
- ;
- -- 验证上面的插入成功(虽然有错但被忽略了)
- select e_name from /test/aaa/test_ext where e_name='onerror_all'
- /**
- output()
- **/
- ;
|