Class: MessageValidationError

MessageValidationError(messageType, issues, optionsopt)

Message validation error for ROS message structure/type issues

Constructor

new MessageValidationError(messageType, issues, optionsopt)

Parameters:
Name Type Attributes Description
messageType string The ROS message type (e.g., 'std_msgs/msg/String')
issues Array.<object> Array of validation issues
Properties
Name Type Attributes Description
field string Field path where issue occurred
problem string Problem type (UNKNOWN_FIELD, TYPE_MISMATCH, etc.)
expected string <optional>
Expected type or value
received any <optional>
Actual value received
options object <optional>
Additional options
Source:

Extends

Methods

getIssuesByType(problemType) → {Array.<object>}

Get issues filtered by problem type
Parameters:
Name Type Description
problemType string Problem type to filter by
Source:
Returns:
Filtered issues
Type
Array.<object>

hasFieldIssue(fieldPath) → {boolean}

Check if a specific field has validation issues
Parameters:
Name Type Description
fieldPath string Field path to check
Source:
Returns:
True if field has issues
Type
boolean

toJSON() → {object}

Returns a detailed error object for logging/serialization
Overrides:
Source:
Returns:
Structured error information
Type
object

toString() → {string}

Returns a user-friendly error description
Overrides:
Source:
Returns:
Formatted error string
Type
string