Vuo  2.3.2
Public Types | Public Member Functions | List of all members
VuoCompilerIssue Class Reference

Description

An error or warning that occurred while compiling a module or composition.

Definition at line 19 of file VuoCompilerIssue.hh.

Public Types

enum  IssueType { Error , Warning }
 Severity levels of issues. More...
 

Public Member Functions

 VuoCompilerIssue (void)
 Constructor. More...
 
 VuoCompilerIssue (IssueType issueType, const string &action, const string &filePath, const string &summary, const string &details)
 Constructor. More...
 
IssueType getIssueType (void)
 Returns the type of issue (error or warning). More...
 
string getSummary (void)
 Returns a brief description of the problem. More...
 
string getDetails (bool htmlFormatted) const
 Returns a lengthier description of the problem. More...
 
string getShortDescription (bool htmlFormatted) const
 Returns the summary and details. More...
 
string getLongDescription (bool htmlFormatted)
 Returns a thorough description of the issue that includes all of the information provided to the constructor. More...
 
void setHint (const string &hint)
 Sets the suggestion to help the user fix the problem. More...
 
string getHint (bool htmlFormatted)
 Returns the suggestion to help the user fix the problem. More...
 
void setHelpPath (const string &path)
 Sets the path to the Help Book file explaining the problem. More...
 
string getHelpPath (void)
 Returns the path to the Help Book file explaining the problem. More...
 
void setFilePath (const string &filePath)
 Sets the file being processed when the issue occurred. More...
 
string getFilePath (void)
 Returns the file being processed when the issue occurred. More...
 
void setLineNumber (int lineNumber)
 Sets the location in source code of the problem. More...
 
int getLineNumber (void)
 Returns the location in source code of the problem. More...
 
void setModuleKey (const string &moduleKey)
 Sets the replacement value for the moduleKey placeholder. More...
 
void setLink (const string &url, const string &text)
 Sets the replacement values for the link placeholder. More...
 
void setModule (VuoModule *module)
 Sets the replacement value for the module placeholder. More...
 
void setNode (VuoNode *node)
 Sets a single node as the node involved in the issue. More...
 
void setNodes (const set< VuoNode * > &nodes)
 Sets the nodes involved in the issue. More...
 
set< VuoNode * > getNodes (void)
 Returns the nodes involved in the issue. More...
 
void setCables (const set< VuoCable * > &cables)
 Sets the cables involved in the issue. More...
 
set< VuoCable * > getCables (void)
 Returns the cables involved in the issue. More...
 
long getHash (void)
 Generates a unique, consistent hash value for the error description info and the problematic nodes and cables. More...
 

Member Enumeration Documentation

◆ IssueType

Severity levels of issues.

Enumerator
Error 

Compilation fails.

Warning 

Compilation can continue, though it may not have the expected result.

Definition at line 25 of file VuoCompilerIssue.hh.

Constructor & Destructor Documentation

◆ VuoCompilerIssue() [1/2]

VuoCompilerIssue::VuoCompilerIssue ( void  )

Constructor.

Useful for putting VuoCompilerIssues in certain STL collections, not for much else.

Definition at line 30 of file VuoCompilerIssue.cc.

◆ VuoCompilerIssue() [2/2]

VuoCompilerIssue::VuoCompilerIssue ( IssueType  issueType,
const string &  action,
const string &  filePath,
const string &  summary,
const string &  details 
)

Constructor.

The arguments will be used to build strings to display in error dialogs or error messages in the shell.

Parameters
issueTypeError if it caused an action to fail completely, warning if the action was able to continue.
actionBrief description of the action that was being attempted, e.g. "compiling module", "opening composition". Use lowercase.
filePathThe file that the action was operating on, e.g. the module being compiled or the composition being opened. If none or unknown, pass an empty string.
summaryBrief description of the cause of the issue, e.g. "Infinite feedback loop", "Subcomposition contains itself". Use sentence case. No period. If the issue is adequately described by the other arguments and the summary would just be redundant, pass an empty string.
detailsLonger description of the cause of the issue. To accommodate either HTML or plain-text formatting, it may contain placeholders that are replaced when returning the issue's details, either by themselves or within other text. Supported placeholders:
  • moduleKey — Replaced with the formatted value of VuoCompilerIssue::moduleKey.
  • module — Replaced with the formatted default title and module key of VuoCompilerIssue::module.
  • link — Replaced with the formatted value of VuoCompilerIssue::linkUrl and VuoCompilerIssue::linkText.

Definition at line 54 of file VuoCompilerIssue.cc.

Member Function Documentation

◆ getCables()

set< VuoCable * > VuoCompilerIssue::getCables ( void  )

Returns the cables involved in the issue.

Definition at line 319 of file VuoCompilerIssue.cc.

◆ getDetails()

string VuoCompilerIssue::getDetails ( bool  htmlFormatted) const

Returns a lengthier description of the problem.

Parameters
htmlFormattedIf false, the returned string is plain text. If true, the returned string may contain HTML formatting.

Definition at line 140 of file VuoCompilerIssue.cc.

◆ getFilePath()

string VuoCompilerIssue::getFilePath ( void  )

Returns the file being processed when the issue occurred.

Definition at line 237 of file VuoCompilerIssue.cc.

◆ getHash()

long VuoCompilerIssue::getHash ( void  )

Generates a unique, consistent hash value for the error description info and the problematic nodes and cables.

Definition at line 327 of file VuoCompilerIssue.cc.

◆ getHelpPath()

string VuoCompilerIssue::getHelpPath ( void  )

Returns the path to the Help Book file explaining the problem.

Definition at line 221 of file VuoCompilerIssue.cc.

◆ getHint()

string VuoCompilerIssue::getHint ( bool  htmlFormatted)

Returns the suggestion to help the user fix the problem.

Parameters
htmlFormattedIf false, the returned string is plain text. If true, the returned string may contain HTML formatting.

Definition at line 205 of file VuoCompilerIssue.cc.

◆ getIssueType()

VuoCompilerIssue::IssueType VuoCompilerIssue::getIssueType ( void  )

Returns the type of issue (error or warning).

Definition at line 122 of file VuoCompilerIssue.cc.

◆ getLineNumber()

int VuoCompilerIssue::getLineNumber ( void  )

Returns the location in source code of the problem.

Definition at line 253 of file VuoCompilerIssue.cc.

◆ getLongDescription()

string VuoCompilerIssue::getLongDescription ( bool  htmlFormatted)

Returns a thorough description of the issue that includes all of the information provided to the constructor.

Parameters
htmlFormattedIf false, the returned string is plain text. If true, the returned string may contain HTML formatting.

Definition at line 167 of file VuoCompilerIssue.cc.

◆ getNodes()

set< VuoNode * > VuoCompilerIssue::getNodes ( void  )

Returns the nodes involved in the issue.

Definition at line 303 of file VuoCompilerIssue.cc.

◆ getShortDescription()

string VuoCompilerIssue::getShortDescription ( bool  htmlFormatted) const

Returns the summary and details.

Parameters
htmlFormattedIf false, the returned string is plain text. If true, the returned string may contain HTML formatting.

Definition at line 150 of file VuoCompilerIssue.cc.

◆ getSummary()

string VuoCompilerIssue::getSummary ( void  )

Returns a brief description of the problem.

Definition at line 130 of file VuoCompilerIssue.cc.

◆ setCables()

void VuoCompilerIssue::setCables ( const set< VuoCable * > &  cables)

Sets the cables involved in the issue.

Definition at line 311 of file VuoCompilerIssue.cc.

◆ setFilePath()

void VuoCompilerIssue::setFilePath ( const string &  filePath)

Sets the file being processed when the issue occurred.

Definition at line 229 of file VuoCompilerIssue.cc.

◆ setHelpPath()

void VuoCompilerIssue::setHelpPath ( const string &  path)

Sets the path to the Help Book file explaining the problem.

Definition at line 213 of file VuoCompilerIssue.cc.

◆ setHint()

void VuoCompilerIssue::setHint ( const string &  hint)

Sets the suggestion to help the user fix the problem.

See also
VuoCompilerIssue(IssueType, const string&, const string&, const string&, const string&) for a list of supported placeholders.

Definition at line 195 of file VuoCompilerIssue.cc.

◆ setLineNumber()

void VuoCompilerIssue::setLineNumber ( int  lineNumber)

Sets the location in source code of the problem.

Definition at line 245 of file VuoCompilerIssue.cc.

◆ setLink()

void VuoCompilerIssue::setLink ( const string &  url,
const string &  text 
)

Sets the replacement values for the link placeholder.

Definition at line 269 of file VuoCompilerIssue.cc.

◆ setModule()

void VuoCompilerIssue::setModule ( VuoModule module)

Sets the replacement value for the module placeholder.

Definition at line 278 of file VuoCompilerIssue.cc.

◆ setModuleKey()

void VuoCompilerIssue::setModuleKey ( const string &  moduleKey)

Sets the replacement value for the moduleKey placeholder.

Definition at line 261 of file VuoCompilerIssue.cc.

◆ setNode()

void VuoCompilerIssue::setNode ( VuoNode node)

Sets a single node as the node involved in the issue.

Definition at line 286 of file VuoCompilerIssue.cc.

◆ setNodes()

void VuoCompilerIssue::setNodes ( const set< VuoNode * > &  nodes)

Sets the nodes involved in the issue.

Definition at line 295 of file VuoCompilerIssue.cc.


The documentation for this class was generated from the following files: