Skip to content

Commit

Permalink
catch MemoryError and advise user
Browse files Browse the repository at this point in the history
  • Loading branch information
jay0lee committed Apr 16, 2019
1 parent 04fc6ad commit 6a2a8dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2049,6 +2049,12 @@ def main(argv):
sys.exit(3)
try:
main(sys.argv[1:])
except MemoryError:
print('''ERROR: GYB ran out of memory during %s. Try the following:
1) Use a 64-bit version of GYB. It has access to more memory.
2) Add "--memory-limit 100" argument to GYB to reduce memory usage.''' % options.action)
sys.exit(5)
except KeyboardInterrupt:
try:
sqlconn.commit()
Expand Down

0 comments on commit 6a2a8dc

Please sign in to comment.