Followup #2999612: Properly deprecate db_query_range
There's some overlap between how Drupal\Core\Utility\Error is determining the caller, and a similar functionality in Drupal\Core\Database\Log::findCaller.
Remove duplication.
Original report:
How to properly make replacements in the next line of the code:
core/lib/Drupal/Core/Utility/Error.php:50: $db_functions = ['db_query', 'db_query_range'];