From 0f56fc6181a3167db9f45b8a042a8d2f56ade3a8 Mon Sep 17 00:00:00 2001 From: Stefan Israelsson Tampe Date: Sun, 2 Sep 2018 19:48:52 +0200 Subject: refined the errors in the os module, translating scheme errors to python errors. close command changed --- modules/language/python/exceptions.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/language/python/exceptions.scm') 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) -- cgit v1.2.3