latest version of apis event and cahce ablitites added

This commit is contained in:
2025-02-10 11:41:38 +03:00
parent e832ec7603
commit 26f601f01a
396 changed files with 34981 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
"""Utility functions for getting line numbers and file locations."""
from inspect import currentframe, getframeinfo, stack
def get_line_number_for_error() -> str:
"""Get the file name and line number of where an error occurred.
Returns:
str: A string in the format 'filename | line_number' showing where the error occurred
"""
caller = stack()[1] # Get the caller's frame
frameinfo = getframeinfo(caller[0])
return f"{frameinfo.filename} | {frameinfo.lineno}"