We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Got weird error when writing function that read whole file:
(define (read-file file) (call-with-input-file file (lambda (port) (let loop ((char (read-char port)) (result '())) (if (eof-object? char) (string (reverse result)) (loop (read-char port) (cons char result)))))))
The code should call (apply string (reverse result)) but instead of nice error about invalid type I got this error instead:
(apply string (reverse result))
lips> (read-file "test.txt") Error is null
The text was updated successfully, but these errors were encountered:
Inside this expression:
(define (read-file file) (call-with-input-file file (lambda (port) (let loop ((char (read-char port)) (result '())) (print (string (reverse result)))))))
It only happens if there is read-char if I remove it, I get a normal error:
read-char
Expecting character got nil in expression string
string
Sorry, something went wrong.
This is simplified reproduction:
(try (begin (Promise.resolve) (typecheck "test" 10 "string")) (finally))
This gives a NodeJS warning:
(try (try (typecheck "test" 10 "string") (finally)) (catch (e) e))
(node:2390128) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 6)
fix try..catch #317
14e65e3
No branches or pull requests
Got weird error when writing function that read whole file:
The code should call
(apply string (reverse result))
but instead of nice error about invalid type I got this error instead:lips> (read-file "test.txt") Error is null
The text was updated successfully, but these errors were encountered: