add_error_message

Emit.add_error_message(message_text, message_type=None)

Add a type 0 “Error” message to either global, active project or active design level of the Message Manager 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 if succeeded.

Examples

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