cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1278
Views
0
Helpful
5
Replies
Highlighted
Enthusiast

error.semantic ! what is the meaning of this.

Hi All,

Im getting the following error when I'm handling NoMatch event in my voice element.

192.168.0.102.1466357802601.0.SprintCustomElements,06/19/2016 23:06:58.190,A VoiceXML error occurred of type "error.semantic": Error in eval(): Mfield=(noMatch);; nested exception is:

  org.mozilla.javascript.EcmaError: ReferenceError: "noMatch" is not defined.

the below code throwing this error

NoMatchPrompt nomatch = new NoMatchPrompt(ved, nomatch_audio_group,"max_nomatch_count", getSubmitURL(), 1);

  VEvent nmEvent= nomatch.getEvent();

  nmEvent.addCount(1, VAction.getNew(pref, VAction.ASSIGN, vFName, "noMatch", VAction.WITHOUT_QUOTES ));

  menufield.add(nmEvent);

VAction throwNomatch = VAction.getNew(pref,VAction.THROW ,VAction.NOMATCH );


can any one helps me what went wrong in my code?. Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

I think the question here is what's supposed to be assigned into the vFName variable in this line of code:

nmEvent.addCount(1, VAction.getNew(pref, VAction.ASSIGN, vFName, "noMatch", VAction.WITHOUT_QUOTES ));

If you're trying to assign the literal word 'noMatch' into your variable then you should change the VAction.WITHOUT_QUOTES to VAction.WITH_QUOTES

If you're trying to assign the contents of a variable named noMatch into the vFName, then  you better ensure you've created and assigned a value to the noMatch variable, otherwise it'll cause this error.

View solution in original post

5 REPLIES 5
Highlighted
Contributor

Is this the line of code that is throwing the error?

VEvent nmEvent= nomatch.getEvent();

  nmEvent.addCount(1, VAction.getNew(pref, VAction.ASSIGN, vFName, "noMatch", VAction.WITHOUT_QUOTES ));

Highlighted

Hi ewindgat , yes ,this peace actually throwing  a nomatch event.

VAction throwNomatch = VAction.getNew(pref,VAction.THROW ,VAction.NOMATCH );


but the below code

VEvent nmEvent= nomatch.getEvent();

nmEvent.addCount(1, VAction.getNew(pref, VAction.ASSIGN, vFName, "noMatch", VAction.WITHOUT_QUOTES ));

cant handle the event thrown by throwNomatch action. If  I kept this with "undefined"  like below it is working.

nmEvent.addCount(1, VAction.getNew(pref, VAction.ASSIGN, vFName, "undefined", VAction.WITHOUT_QUOTES ));

As per my understanding ,

VAction.getNew(pref,VAction.THROW ,VAction.NOMATCH ); always throws undefined for whether it is noinput or nomatch.It did allow to assign a variable with some value , but the finally returning undefined. I don't know my understanding is right or wrong.





Highlighted

You might try using the VXML_LOG_VARIABLE_NAME then concatenating other values for your "noMatch" variable.

It might not be your variable "noMatch" that is undefined, but finding a match in the JS function.

You might start with your vFName.

Highlighted

I think the question here is what's supposed to be assigned into the vFName variable in this line of code:

nmEvent.addCount(1, VAction.getNew(pref, VAction.ASSIGN, vFName, "noMatch", VAction.WITHOUT_QUOTES ));

If you're trying to assign the literal word 'noMatch' into your variable then you should change the VAction.WITHOUT_QUOTES to VAction.WITH_QUOTES

If you're trying to assign the contents of a variable named noMatch into the vFName, then  you better ensure you've created and assigned a value to the noMatch variable, otherwise it'll cause this error.

View solution in original post

Highlighted

Oh I'll try this . and thank you very much for the help