Difference between revisions of "Message handling"

From Verific Design Automation FAQ
Jump to: navigation, search
(Created page with "'''Q: How do I upgrade/downgrade messages from Verific?''' For C++, use the following APIs: Message::SetMessageType() - Force a message type by message id Message::Ge...")
 
m
Line 1: Line 1:
 
'''Q: How do I upgrade/downgrade messages from Verific?'''
 
'''Q: How do I upgrade/downgrade messages from Verific?'''
 +
 +
You can set any message to any type below:
 +
 +
VERIFIC_NONE,        // print no prefix
 +
VERIFIC_ERROR,        // print ERROR:
 +
VERIFIC_WARNING,      // print WARNING:
 +
VERIFIC_IGNORE,      // ignore message (do not print message):
 +
VERIFIC_INFO,        // print INFO:
 +
VERIFIC_COMMENT,      // print --
 +
VERIFIC_PROGRAM_ERROR // print PROGRAM_ERROR
  
 
For C++, use the following APIs:
 
For C++, use the following APIs:
Line 12: Line 22:
 
  clearmsgtype
 
  clearmsgtype
  
Note that downgrading an error may make Verific's behavior unpredictable.
+
Some Perl command examples:
 +
 +
# ignore message VNLR-1015
 +
Verific::Message::SetMessageType("VNLR-1015", $Verific::VERIFIC_IGNORE);
 +
# ignore all warning messages
 +
Verific::Message::SetAllMessageType($Verific::VERIFIC_WARNING, $Verific::VERIFIC_IGNORE);
 +
 
 +
Note that downgrading an error may have unpredictable/undesirable results.

Revision as of 11:27, 29 November 2016

Q: How do I upgrade/downgrade messages from Verific?

You can set any message to any type below:

VERIFIC_NONE,         // print no prefix
VERIFIC_ERROR,        // print ERROR:
VERIFIC_WARNING,      // print WARNING:
VERIFIC_IGNORE,       // ignore message (do not print message):
VERIFIC_INFO,         // print INFO:
VERIFIC_COMMENT,      // print --
VERIFIC_PROGRAM_ERROR // print PROGRAM_ERROR

For C++, use the following APIs:

Message::SetMessageType()       - Force a message type by message id
Message::GetMessageType()       - Get the message type by message id
Message::ClearMessageType()     - Clear a message type by message id
Message::SetAllMessageType()    - Force all messages of type 'orig' to behave as type 'type'.
Message::ClearAllMessageTypes() - Clear all forced message types

For Tcl, use the following commands:

setmsgtype
clearmsgtype

Some Perl command examples:

# ignore message VNLR-1015
Verific::Message::SetMessageType("VNLR-1015", $Verific::VERIFIC_IGNORE);
# ignore all warning messages
Verific::Message::SetAllMessageType($Verific::VERIFIC_WARNING, $Verific::VERIFIC_IGNORE);

Note that downgrading an error may have unpredictable/undesirable results.