Commit graph

17 commits

Author SHA1 Message Date
Peter Taoussanis
5c977a348b [doc] Better document pattern of using trace!/spy! with catch->error! 2024-12-23 23:04:40 +01:00
Peter Taoussanis
0de5c094e5 [mod] Remove advanced options from catch->error!
`catch->error!` with default opts is quite handy for use with `trace!`/`spy!`.

But there's a lot that users might want to customize, including:

  - Exactly what error type to catch.
  - Whether or not to rethrow on catch.
  - Error binding sym to enable use within signal message, data, etc.

We could support all of this via `catch->error!` opts but there's not much
point. If anyway customizing such behaviour, it'd be better for the user to just
use an appropriate `try/catch`.

So I've now documented this recommendation, and removed all but the most basic
(:catch-val) options.

This is a BREAKING change for anyone that was previously using any of the
following options:

  :rethrow?
  :catch-sym

Note that `:rethrow?` was never particularly helpful (independently of
`:catch-val` anyway), and the removal of `:catch-sym` will throw a compile-time
error for any existing users.
2024-12-23 23:04:40 +01:00
Peter Taoussanis
d2386d62f1 [new] Refactor impln of common signal creators
Objectives:

  - Support single map opts arg in all cases.

  - Make it easier for folks to inspect the source to understand how
    the common creators use/wrap underlying `signal!`.

Also updated relevant docstrings, etc.
2024-12-23 12:30:00 +01:00
Peter Taoussanis
7eb46ff555 [nop] Misc housekeeping 2024-12-22 13:58:03 +01:00
Peter Taoussanis
cca8bb33ff [doc] Misc improvements 2024-12-22 13:58:03 +01:00
Peter Taoussanis
55720aca54 [doc] [#35] Emphasize that opts need to be a compile-time map 2024-12-22 13:58:03 +01:00
Peter Taoussanis
13d9dbfc62 [doc] Document that :msg may be a delay 2024-12-22 13:50:01 +01:00
Peter Taoussanis
7532c2eca5 [new] Give signal! a default kind and level 2024-12-22 13:49:53 +01:00
Peter Taoussanis
4f5eda0489 [doc] Fix incorrect :msg_ key info 2024-10-29 10:02:13 +01:00
Peter Taoussanis
2d8c528a6a [doc] [#25] Expand info on IoC tracing, etc. 2024-10-29 10:02:13 +01:00
Peter Taoussanis
c5c8a188c1 [doc] [#25] Add extra info re: async tracing 2024-10-29 10:02:13 +01:00
Peter Taoussanis
5a8c407528 [new] Add :ctx+, :middleware+ signal options 2024-10-29 10:02:12 +01:00
Peter Taoussanis
d9c3583631 [new] Add :rate-limit-by option to all signal creators
When present, will cause limits to be per [expansion, by-value]
2024-09-20 22:55:12 +02:00
Peter Taoussanis
f52a04b4dc [fix] [#18] Support {:uid :auto} for non-tracing signal creators 2024-09-20 22:55:12 +02:00
Peter Taoussanis
974df3e152 [doc] Drop suggested edn suffixes from env config 2024-09-20 22:55:12 +02:00
Peter Taoussanis
e4a0a41a1b [doc] Misc improvements 2024-09-20 22:55:12 +02:00
Peter Taoussanis
19cd1af3a4 [nop] Restructure repo 2024-08-28 16:53:31 +02:00