#F
OK this is much better.
I am now using 'with-exception-handler instead
of the (i think) chicken specific 'handle-exceptions.


(sqli:first-row ...) will throw an exception if there
are no results.

I know this is kind of a code smell, but I choose
it to move fast. (as opposed to choosing it, and
retconning it as a good thing.)



(define (get-register db key)
(let* ((sql #<#_sql_
SELECT * FROM register
WHERE key = '#{key}';
_sql_
))
(with-exception-handler
(lambda (exn)
(printf "-- get-register exn --~%")
(let* ((is-cond (condition? exn)))
(printf "cond?:~a~%" is-cond))
#f)
(lambda ()
(sqli:first-row db sql)))))


#scheme #chicken #lisp

Elk Logo

Elk is in Preview!

Thanks for your interest in trying out Elk, our work-in-progress Mastodon web client!

Expect some bugs and missing features here and there. we are working hard on the development and improving it over time.

Elk is Open Source. If you'd like to help with testing, giving feedback, or contributing, reach out to us on GitHub and get involved.

To boost development, you can sponsor the Team through GitHub Sponsors. We hope you enjoy Elk!

Daniel RoeAnthony FuPatak三咲智子 Kevin Deng

The Elk Team