fix(Map): Fix systems cleanup

This commit is contained in:
Dmitry Popov
2024-10-21 13:02:42 +02:00
parent 9c5f6049b5
commit 13e818abfd
2 changed files with 16 additions and 1 deletions

View File

@@ -30,4 +30,19 @@ defmodule WandererApp do
defmacro __using__(which) when is_atom(which) do
apply(__MODULE__, which, [])
end
def log_exception(kind, reason, stacktrace) do
reason = Exception.normalize(kind, reason, stacktrace)
crash_reason =
case kind do
:throw -> {{:nocatch, reason}, stacktrace}
_ -> {reason, stacktrace}
end
Logger.error(
Exception.format(kind, reason, stacktrace),
crash_reason: crash_reason
)
end
end

View File

@@ -1,7 +1,7 @@
defmodule WandererApp.MapRepo do
use WandererApp, :repository
@default_map_options %{"layout" => "left_to_right", "store_custom_labels" => false}
@default_map_options %{"layout" => "left_to_right", "store_custom_labels" => "false"}
def get(map_id, relationships \\ []) do
map_id