try statement

For questions regarding programming in the EViews programming language.

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

lukevancleve
Posts: 18
Joined: Mon Apr 29, 2013 1:24 pm

try statement

Postby lukevancleve » Wed Jul 10, 2013 11:15 am

Whats the try statement in eviews?

ie:

try
shell .....
end try

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

Re: try statement

Postby EViews Gareth » Wed Jul 10, 2013 11:19 am

Do or do not, There is no try statement.

lukevancleve
Posts: 18
Joined: Mon Apr 29, 2013 1:24 pm

Re: try statement

Postby lukevancleve » Wed Jul 10, 2013 11:26 am

Do or do not, There is no try statement.
If my shell command returns an error code then there's nothing I can do to not have my program crash?

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

Re: try statement

Postby EViews Gareth » Wed Jul 10, 2013 11:29 am

The spawn command lets you set an EViews error if the exit code is not as expected. You could then test for whether an error has occured.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests