add_error_message#

Emit.add_error_message(message_text, message_type=None)[source]#

Add a type 0 “Error” message to either the global, active project, or active design level of the message mmanager tree.

Also add an “Error” message to the logger if the handler is present.

Parameters:
message_textstr

Text to display as the “Error” message.

message_typestr, optional

Level to add the “Error” message to. Options are "Global", "Project", and "Design". The default is None, in which case the “Error” message gets added to the "Design" level.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyaedt import Hfss
>>> hfss = Hfss()
>>> hfss.logger.error("Global error message", "Global")
>>> hfss.logger.project_logger.error("Project error message", "Project")
>>> hfss.logger.design_logger.error("Design error message")