Skip to content

Commit f6b4733

Browse files
committed
Downgrade log message
Downgrade log message when an error occurs while iterating processes to search for ansysedt sessions. Rationale: 1. If any error occurs during the ansysedt session search process loop, the end result is that the process in question is not returned as a potential ansysedt session. This is generally not harmful. 2. There is nothing the user could have done to make the error not occur: they have no control over the processes on the machine, the behavior of `psutil`, or the logic in this loop. 3. Downgrading to debug allows us to also log the full stack trace of the exception, allowing us to identify fixes to the logic for cases that fail in the future.
1 parent 1c8651a commit f6b4733

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ansys/aedt/core/generic/general_methods.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,10 @@ def _current_username():
754754
except psutil.NoSuchProcess as e: # pragma: no cover
755755
pyaedt_logger.debug(f"The process exited and cannot be an active session: {e}")
756756
except Exception as e: # pragma: no cover
757-
pyaedt_logger.error(
757+
pyaedt_logger.debug(
758758
f"A(n) {type(e)} error occurred while retrieving information for the active AEDT sessions: {e}"
759759
)
760+
pyaedt_logger.debug(traceback.format_exc())
760761
return return_dict
761762

762763

0 commit comments

Comments
 (0)