Error handling

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

fi99ggb
Posts: 26
Joined: Tue Jul 02, 2019 4:05 am

Error handling

Postby fi99ggb » Mon Apr 06, 2020 3:07 am

Hello

I am using the setmaxerrs to handle processing errors; however, there are cases when EViews naturally stops, for example, when a file I am instructing to open does not exist or when a file cannot be reshaped. In those cases, I would like to manage the error. For example, when EViews stops I would like to run another program file or a specific part of a program file. I would like to note that my code is quite long and it would be practically difficult to know where the error has taken place.

I hope I make sense. I appreciate that my inquiry is unusual and maybe there is no easy solution.

Thanks
George

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: Error handling

Postby EViews Gareth » Mon Apr 06, 2020 8:04 am

You can use @errorcount to check if an error has occured after a line, and then branch based on if it has or not.

fi99ggb
Posts: 26
Joined: Tue Jul 02, 2019 4:05 am

Re: Error handling

Postby fi99ggb » Wed Apr 08, 2020 1:10 am

Thank you!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests