diff options
author | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-09-02 19:48:52 +0200 |
---|---|---|
committer | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-09-02 19:48:52 +0200 |
commit | 0f56fc6181a3167db9f45b8a042a8d2f56ade3a8 (patch) | |
tree | 19966c8557ecdd0024903b04157ee90e4af64d4f /modules/language/python/exceptions.scm | |
parent | 3d44139af1b65ec71abafec939b5240d3821490b (diff) |
refined the errors in the os module, translating scheme errors to python errors. close command changed
Diffstat (limited to 'modules/language/python/exceptions.scm')
-rw-r--r-- | modules/language/python/exceptions.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/language/python/exceptions.scm b/modules/language/python/exceptions.scm index 915c9ef..8bc812f 100644 --- a/modules/language/python/exceptions.scm +++ b/modules/language/python/exceptions.scm @@ -13,9 +13,11 @@ ZeroDivisionError ArithmeticError OverflowError RecursionError Warning DeprecationWarning BytesWarning + ResourceWarning UnicodeDecodeError LookupError IndentationError KeyboardInterrupt MemoryError NameError - EOFError UnicodeError)) + EOFError UnicodeError + FileExistsError FileNotFoundError IsADirectoryError )) (define-syntax-rule (aif it p x y) (let ((it p)) (if it x y))) @@ -67,7 +69,9 @@ (define StopIteration 'StopIteration) (define GeneratorExit 'GeneratorExit) - +(define-er FileExistsError 'FileExistsError) +(define-er FileNotFoundError 'FileNotFoundError) +(define-er IsADirectoryError 'IsADirectoryError) (define-er UnicodeError 'UnicodeError) (define-er EOFError 'EOFError) (define-er MemoryError 'MemoryError) @@ -119,3 +123,4 @@ (define-wr BytesWarning 'BytesWarning) (define-wr DepricationWarning 'DeprecationWarning) +(define-wr ResourceWarning 'ResourceWarning) |