aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_ops/cash.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/report_ops/cash.py')
-rw-r--r--python/report_ops/cash.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/report_ops/cash.py b/python/report_ops/cash.py
index 3d4157a1..c71fcdc0 100644
--- a/python/report_ops/cash.py
+++ b/python/report_ops/cash.py
@@ -7,6 +7,7 @@ import pandas as pd
from serenitas.utils.env import DAILY_DIR
from serenitas.utils.db2 import dbconn
from serenitas.analytics.dates import prev_business_day
+from serenitas.analytics.exceptions import MissingDataError
from .misc import get_dir, dt_from_fname, Custodian
@@ -40,7 +41,7 @@ class CashReport:
default=None,
)
if not p:
- raise ValueError(
+ raise MissingDataError(
f"No reports found for fund: {prefix.split('_')[-1]} date: {date}"
)
return p
@@ -138,4 +139,4 @@ class ScotiaCashReport(CashReport, custodian="SCOTIA", dtkey="%Y%m%d%H%M%S"):
)
)
except StopIteration as e:
- raise ValueError(f"No file available for Scotia on {date}") from e
+ raise MissingDataError(f"No file available for Scotia on {date}") from e