Skip to content

Commit 3dde9bf

Browse files
valallansyspre-commit-ci[bot]pyansys-ci-botgerma89
authored
feat: modify error handling in case of attribute error for db calls (#4427)
* feat: modify error handling in case of attribute error for db calls * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * chore: adding changelog file 4427.added.md [dependabot-skip] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: German <28149841+germa89@users.noreply.github.com>
1 parent c6811d7 commit 3dde9bf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

doc/changelog.d/4427.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Modify error handling in case of attribute error for db calls

src/ansys/mapdl/core/mapdl_inprocess.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ def input(
8181
def exit(self) -> None:
8282
self._in_process_backend.exit()
8383

84+
@property
85+
def db(self):
86+
raise AttributeError(
87+
f"{type(self).__name__!s} doesn't support the 'db' backend, check documentation for alternatives."
88+
)
89+
8490
@MapdlBase.name.getter
8591
def name(self) -> str:
8692
return "MapdlInProcess"

0 commit comments

Comments
 (0)