-
Notifications
You must be signed in to change notification settings - Fork 6
/
base.ss
55 lines (42 loc) · 2.12 KB
/
base.ss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#lang scheme/base
(require (for-syntax scheme/base)
(planet untyped/unlib:3/require))
(define-library-aliases cce-scheme (planet cce/scheme:7) #:provide)
(define-library-aliases schemeunit (planet schematics/schemeunit:3) #:provide)
(define-library-aliases sqlite (planet jaymccarthy/sqlite:4:1) #:provide)
(define-library-aliases unlib (planet untyped/unlib:3:20) #:provide)
(require scheme/class
scheme/contract
scheme/match
scheme/pretty
scheme/serialize
srfi/26
(unlib-in debug exn time))
; Logging --------------------------------------
; Exception types ------------------------------
; Raised when Snooze encounters a problem that is likely caused by mistakes in user code.
(define-struct (exn:fail:snooze exn:fail) () #:transparent)
; Raised when Snooze could not parse a query.
; (struct ... ???)
(define-struct (exn:fail:snooze:query exn:fail:snooze) (backtrace) #:transparent)
; Raised when Snooze tries to save out-of-date data to the database.
; (struct ... snooze-struct)
(define-struct (exn:fail:snooze:revision exn:fail:snooze) (struct) #:transparent)
; Raised when Snooze tries to roll back a non-existant transaction.
(define-struct (exn:fail:snooze:transaction exn:fail:snooze) () #:transparent)
; Raised when a struct cannot be saved/deleted because of failed checks.
; (struct ... snooze-struct (listof check-result))
(define-struct (exn:fail:snooze:check exn:fail:snooze) (struct results) #:transparent)
(define-struct (exn:fail:snooze:check:save exn:fail:snooze:check) () #:transparent)
(define-struct (exn:fail:snooze:check:delete exn:fail:snooze:check) () #:transparent)
; Raised when the database connection limit is exceeded.
(define-struct (exn:fail:snooze:connection-count exn:fail:snooze) () #:transparent)
; Provide statements ---------------------------
(provide (all-from-out scheme/class
scheme/contract
scheme/match
scheme/pretty
scheme/serialize
srfi/26)
(unlib-out debug exn time)
(all-defined-out))