The exception every Ambient misuse raises, carrying a machine-readable
:reason alongside the human-readable message.
Match on :reason rather than on message text – the wording is not part of
the contract:
try do
Ambient.ProcessOverride.put(table, :k, :v)
rescue
e in Ambient.Error ->
case e.reason do
:overrides_disabled -> :skip
:server_not_started -> start_and_retry()
end
endReasons
:overrides_disabled– the build didn't opt into the override machinery (config :ambient, enable_overrides: …). SeeAmbient.ProcessOverride.:server_not_started– noAmbient.ProcessOverride.Serverowns this table; callAmbient.start_servers/1first.{:not_shared_owner, pid}– the table is in shared mode and onlypidmay write to it.:cant_allow_in_shared_mode–allow/3is meaningless while a table is shared, since every process already reads the shared owner's values.:not_a_value_module– something that is neither a module built withAmbient.Valuenor a table atom was passed toAmbient.start_servers/1and friends.{:server_start_failed, reason}– the supervisor refused to start a table's server.