Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Punish code without a valid entry point... e.g. no/bad main() #11

Open
acharlieh opened this issue Jan 3, 2013 · 0 comments
Open

Punish code without a valid entry point... e.g. no/bad main() #11

acharlieh opened this issue Jan 3, 2013 · 0 comments

Comments

@acharlieh
Copy link

It could come to pass that code given to vigil may not have a main method, or said main method could throw an exception.

I propose that in such cases the provided file be wiped from this earth, but currently I instead wind up with:

$ touch empty_file.vg 
$ ../vigil empty_file.vg 
uncaught error from line  3
Traceback (most recent call last):
  File "../vigil", line 94, in <module>
    exec(source)
  File "<string>", line 5, in <module>
  File "../vigil", line 76, in vigil_uncaught
    punish(raise_line, "Raised '%s' which was not caught." % sys.exc_info()[1])
  File "../vigil", line 19, in punish
    if re.match('def ', source_lines[start]):
IndexError: list index out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant