Set_field with null value throw exception


(Charles Deng) #1

it is a normal cases happen to get null value when using split function to get field value. i noticed that there is gl2_processing_error field report a error such as … an exception was thrown: null and also report errors at rule list:

image


(Charles Deng) #2

more checking found that split function with default limit value will drop the null string field values at end of the input string. for example,

let msg=split("\\|","|111|222||");

then the result msg being:

["",“111”,“222”] instead of ["",“111”,“222”,"",""]

so when using msg[0] ~ msg[2] as value set_field OK, but using msg[4]~msg[5] set_field will throw exception.

if we using a call with a limit parameter will fix this:

let msg=split("\\|","|111|222||",5);

(system) #3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.