Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Commit

Permalink
whoops, forgot to add the actual errors file
Browse files Browse the repository at this point in the history
  • Loading branch information
Charter Jacobson committed Mar 11, 2018
1 parent 899c76a commit d1c19bb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
- AddressError
- CommandError
- KeyboardError
- InputError
"""

def CollieError(type, line, desc):
print "Collie "+str(type)+":\n "+str(line)+"\n"+str(desc)
quit()

def AddressError(line, addr):
CollieError("AddressError", line, "Invalid address or number: "+str(addr))

def CommandError(line, cmd):
CollieError("CommandError", line, "Unknown command or trick: "+str(cmd))

def KeyboardError(line):
CollieError("KeyboardError", line, "The program was ended by user input.")

def InputError(line, input):
CollieError("InputError", line, "Unexpected input: "+repr(input))

0 comments on commit d1c19bb

Please sign in to comment.