peass-ng/PEASS-ng · error · ParseErrorException
Syntax error at line {0} column {1}
Error message
Syntax error at line {0} column {1}
What it means
The central error reporter of the YamlSerializer parser: Error() formats the message with the current token's line and column and throws ParseErrorException. It is invoked from ErrorUnless/ErrorIf helpers at every grammar decision point, so this message means the YAML input violated the parser grammar at the reported position — effectively 'unexpected token at line/column', with the position supplied by the scanner state.
Source
Thrown at winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/Parser.cs:165
/// </summary>
public int Raw;
/// <summary>
/// Column in a text.
/// </summary>
public int Column;
}
#endregion
#region Error / Warning
/// <summary>
/// Reporting syntax error by throwing <see cref="ParseErrorException"/>.
/// </summary>
/// <param name="message"><see cref="string.Format(string,object[])"/> template for the error message.</param>
/// <param name="args"><see cref="string.Format(string,object[])"/> parameters if required</param>
/// <returns>Because it throw exception, nothing will be returned in reality.</returns>
public bool Error(string message, params object[] args)
{
throw new ParseErrorException(
string.Format("Syntax error at line {0} column {1}\r\n", CurrentPosition.Raw, CurrentPosition.Column) +
string.Format(message, args));
}
/// <summary>
/// <para>Give warning if <paramref name="condition"/> is true.</para>
///
/// <para>By default, the warning will not be shown / stored to anywhere.
/// To show or log the warning, override <see cref="StoreWarning"/>.</para>
/// </summary>
/// <example>
/// <code>
/// return
/// SomeObsoleteReductionRule() &&
/// WarningIf(
/// context != Context.IndeedObsolete,
/// "Obsolete");
/// </code>
/// </example>View on GitHub (pinned to 53fb989abc)
Solutions
- Fix the YAML syntax at the reported line/column (indentation, missing colon/quote, stray characters)
- Validate YAML with a linter or YamlSerializer round-trip before shipping
- Include the ParseErrorException position in user-facing error output to speed correction
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at winPEAS/winPEASexe/winPEAS/3rdParty/YamlSerializer/Parser.cs:165 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of peass-ng/PEASS-ng@53fb989abc (2026-09-02).
Data as JSON: /api/errors/1703907cb90f9018.
Report an issue: GitHub.