hexagon logo

Is there a way to catch errors in a view macro?

I'm trying to achieve something similar to try/catch in c++ or try/except in python.
Parents
  • I am wondering why I get error message when try to run a cmd file that contains $_self. I created a .cmd that contains beneath code:
    var set var = $_self.workdir string=(eval(GETCWD()))
     
    while I get error message that says:
     
    ERROR:  ---------------------------------------------------------------------
    ERROR:  Error detected on line number 4, character 16 of a_test.cmd.
    ERROR:  Invalid character. Enter a legal character.
    ERROR:  The command was not executed.
    ERROR:  >> var set var = $_self.workdir string=(eval(GETCWD()))
    ERROR:  ---------------------------------------------------------------------
     
Reply
  • I am wondering why I get error message when try to run a cmd file that contains $_self. I created a .cmd that contains beneath code:
    var set var = $_self.workdir string=(eval(GETCWD()))
     
    while I get error message that says:
     
    ERROR:  ---------------------------------------------------------------------
    ERROR:  Error detected on line number 4, character 16 of a_test.cmd.
    ERROR:  Invalid character. Enter a legal character.
    ERROR:  The command was not executed.
    ERROR:  >> var set var = $_self.workdir string=(eval(GETCWD()))
    ERROR:  ---------------------------------------------------------------------
     
Children
No Data