We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc24a9a commit da99c79Copy full SHA for da99c79
lib/ecto/adapters/sql.ex
@@ -1425,6 +1425,14 @@ defmodule Ecto.Adapters.SQL do
1425
1426
@repo_modules [Ecto.Repo.Queryable, Ecto.Repo.Schema, Ecto.Repo.Transaction]
1427
1428
+ @doc """
1429
+ Receives a stacktrace, and return the first N items before Ecto entries
1430
+
1431
+ This function is used by default in the `:log_stacktrace_info` config, with
1432
+ a size of 1.
1433
+ """
1434
+ @spec first_non_ecto_stacktrace(Exception.stacktrace(), Ecto.Repo.t(), non_neg_integer()) ::
1435
+ Exception.stacktrace()
1436
def first_non_ecto_stacktrace(stacktrace, repo, size) do
1437
stacktrace
1438
|> Enum.reverse()
0 commit comments