Class ExceptionHelper
Inheritance
Namespace: IronSoftware.Exceptions
Assembly: IronPdf.dll
Syntax
public static class ExceptionHelper : Object
ExceptionHelper is what composes the message text attached to raised IronPDF exceptions, the internal string-composition utility behind the format you read when catching them. Application code that catches IronPDF exceptions reads the result of this composition through the standard Exception.Message property and rarely calls ExceptionHelper directly.
ExceptionHelper matters when reading exception messages produced by IronPDF, because every message in the IronSoftware.Exceptions namespace family follows the same composed format: a human-readable summary, a help URL pointing into the troubleshooting catalog, an optional issue code such as IRONPDF-NATIVE-EXCEPTION, and an optional issue detail. Recognising the format makes it possible to parse a raised exception's Message for the help link and the issue code without bespoke regex, and makes log lines such as the one in the IronPDF native exception troubleshooting guide immediately searchable against the support catalog.
The full API surface of ExceptionHelper is a single static method. ExceptionHelper.Message(string message, string helpUrl, string issueCode = null, string issueDetail = null) returns a string. The first two parameters are required; the trailing issueCode and issueDetail parameters default to null and are appended only when non-null. The method is a pure formatter, takes no state, and is thread-safe by virtue of the static signature and the lack of any shared field. Because the class is static, it has no constructors and cannot be instantiated, and every call uses ExceptionHelper.Message(...) directly.
using IronSoftware.Exceptions;
// ExceptionHelper composes the Message string that IronPDF attaches to its
// exception types. Application code typically reads the composed string from
// the caught exception's Message property, not by calling this method.
string composed = ExceptionHelper.Message(
message: "Error while generating PDF from HTML",
helpUrl: "https://ironpdf.com/troubleshooting/ironpdf-native-exception/",
issueCode: "IRONPDF-NATIVE-EXCEPTION");For the canonical raised exception type that surfaces the composed text, see the IronPDF native exception troubleshooting guide. When a raised IronPDF exception cannot be resolved from the help URL alone, the engineering support request guide lists the log files to attach.
Methods
Message(String, String, String, String)
Declaration
public static string Message(string message, string helpUrl, string issueCode = null, string issueDetail = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | |
| System.String | helpUrl | |
| System.String | issueCode | |
| System.String | issueDetail |
Returns
| Type | Description |
|---|---|
| System.String |