Skip to content

Commit

Permalink
refactor: error message
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Aug 9, 2024
1 parent ba2895e commit a8af85a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/ansys/mapdl/core/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,14 @@ def wrapper(*args, **kwargs):
f"$ export PYMAPDL_MAX_MESSAGE_LENGTH={lim_}"
)

if error.code() == grpc.StatusCode.UNAVAILABLE and "FD shutdown" in str(
error
):
if error.code() == grpc.StatusCode.UNAVAILABLE:
# Very likely the MAPDL server has died.
suggestion = " MAPDL *might* have died because it ran out of memory.\n Check the MAPDL command output for more details.\n Open an issue on GitHub if you need assistance: https://github.com/ansys/pymapdl/issues"
suggestion = (
" MAPDL *might* have died because it executed a not-allowed command or ran out of memory.\n"
" Check the MAPDL command output for more details.\n"
" Open an issue on GitHub if you need assistance: "
"https://github.com/ansys/pymapdl/issues"
)

# Generic error
handle_generic_grpc_error(error, func, args, kwargs, reason, suggestion)
Expand Down Expand Up @@ -446,7 +449,6 @@ def handle_generic_grpc_error(error, func, args, kwargs, reason="", suggestion="

# Must close unfinished processes
mapdl._close_process()

raise MapdlExitedError(msg)


Expand Down

0 comments on commit a8af85a

Please sign in to comment.