@@ -503,7 +503,7 @@ def solution(self):
503503 >>> mapdl.solution.converged
504504 """
505505 if self ._exited :
506- raise RuntimeError ("MAPDL exited." )
506+ raise MapdlRuntimeError ("MAPDL exited." )
507507 return self ._solution
508508
509509 @property
@@ -526,7 +526,7 @@ def post_processing(self):
526526 5.70333124e-05, 8.58600402e-05, 1.07445726e-04])
527527 """
528528 if self ._exited :
529- raise RuntimeError (
529+ raise MapdlRuntimeError (
530530 "MAPDL exited.\n \n Can only postprocess a live " "MAPDL instance."
531531 )
532532 return self ._post
@@ -560,7 +560,7 @@ def chain_commands(self):
560560
561561 """
562562 if self ._distributed :
563- raise RuntimeError (
563+ raise MapdlRuntimeError (
564564 "Chained commands are not permitted in distributed ansys."
565565 )
566566 return self ._chain_commands (self )
@@ -972,7 +972,7 @@ def open_apdl_log(self, filename, mode="w"):
972972 >>> mapdl.open_apdl_log("log.inp")
973973 """
974974 if self ._apdl_log is not None :
975- raise RuntimeError ("APDL command logging already enabled" )
975+ raise MapdlRuntimeError ("APDL command logging already enabled" )
976976 self ._log .debug ("Opening ANSYS log file at %s" , filename )
977977
978978 if mode not in ["w" , "a" , "x" ]:
@@ -1041,7 +1041,7 @@ def open_gui(self, include_result=None, inplace=None): # pragma: no cover
10411041 from ansys .mapdl .core .launcher import get_ansys_path
10421042
10431043 if not self ._local :
1044- raise RuntimeError (
1044+ raise MapdlRuntimeError (
10451045 "``open_gui`` can only be called from a local MAPDL instance."
10461046 )
10471047
@@ -2055,7 +2055,9 @@ def result(self) -> "ansys.mapdl.reader.rst.Result":
20552055 result = Result (result_path , read_mesh = False )
20562056 if result ._is_cyclic :
20572057 if not os .path .isfile (self ._result_file ):
2058- raise RuntimeError ("Distributed Cyclic result not supported" )
2058+ raise MapdlRuntimeError (
2059+ "Distributed Cyclic result not supported"
2060+ )
20592061 result_path = self ._result_file
20602062 else :
20612063 result_path = self ._result_file
@@ -2862,13 +2864,13 @@ def run(self, command, write_to_log=True, mute=None, **kwargs) -> str:
28622864 )
28632865
28642866 if command [:3 ].upper () in INVAL_COMMANDS :
2865- exception = RuntimeError (
2867+ exception = MapdlRuntimeError (
28662868 'Invalid PyMAPDL command "%s"\n \n %s'
28672869 % (command , INVAL_COMMANDS [command [:3 ].upper ()])
28682870 )
28692871 raise exception
28702872 elif command [:4 ].upper () in INVAL_COMMANDS :
2871- exception = RuntimeError (
2873+ exception = MapdlRuntimeError (
28722874 'Invalid PyMAPDL command "%s"\n \n %s'
28732875 % (command , INVAL_COMMANDS [command [:4 ].upper ()])
28742876 )
@@ -3341,7 +3343,7 @@ def get_array(
33413343 while arr .size == 1 and arr [0 ] == - 1 :
33423344 arr = self ._get_array (entity , entnum , item1 , it1num , item2 , it2num , kloop )
33433345 if ntry > 5 :
3344- raise RuntimeError ("Unable to get array for %s" % entity )
3346+ raise MapdlRuntimeError ("Unable to get array for %s" % entity )
33453347 ntry += 1
33463348 return arr
33473349
0 commit comments