Can I throw an error in vbscript?

前端 未结 3 2032
野趣味
野趣味 2020-12-29 02:53

I\'m used to programing in C#, which obviously has some pretty robust error handling. Now I\'m working on a short project in VBScript. I\'ve read about the error handling wi

3条回答
  •  萌比男神i
    2020-12-29 03:39

    Yes, you can. Use the Err.Raise method, e.g.:

    Err.Raise 5 ' Invalid procedure call or argument
    

    For a list of VBScript's standard error codes, see Errors (VBScript).

提交回复
热议问题