IronPDFにおけるネイティブの例外処理
最近のIronPDFのバージョンでは、ログ内のネイティブ例外メッセージに特定の問題コードが含まれます: [Issue Code IRONPDF-NATIVE-EXCEPTION]。 そのような例外メッセージの例は以下の通りです:
IronPdf.Exceptions.IronPdfNativeException: Error while generating PDF from HTML: 'Error while rendering pdf from html for job group 0: 'Error during dev tools execution: {"method":"Inspector.targetCrashed","params":{}}''.
2024-01-25 08:12:11,960 INFO [Thread-3] [, , , , , , , , ] c.i.i.i.s.Access: [IronPdfEngine] To learn how to solve this issue please read https://ironpdf.com/troubleshooting/ironpdf-native-exception [Issue Code IRONPDF-NATIVE-EXCEPTION]
考えられる原因
IronPDFのネイティブ例外は通常、IronPDFとChrome PDFレンダリングエンジンの依存関係であるIronPdf.Native.Chromeパッケージで使用されているC++コードに関連する様々な問題から発生します。
解決策
ネイティブ例外に関連する問題でサポートを受けるには、エンジニアリングサポートのリクエストを送信し、さらなる調査のために完全なログファイルを提供してください。
プロジェクトに次のコードスニペットを含めてネイティブロギングを有効にします:
// Set the path for the log file.
// This can be a directory name or a specific file path. Here, we set it to "Default.log".
IronPdf.Logging.Logger.LogFilePath = "Default.log";
// Enable logging for all modes to capture comprehensive details
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All;
// Set the path for the log file.
// This can be a directory name or a specific file path. Here, we set it to "Default.log".
IronPdf.Logging.Logger.LogFilePath = "Default.log";
// Enable logging for all modes to capture comprehensive details
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All;
' Set the path for the log file.
' This can be a directory name or a specific file path. Here, we set it to "Default.log".
IronPdf.Logging.Logger.LogFilePath = "Default.log"
' Enable logging for all modes to capture comprehensive details
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All
IronPDFによって作成されたログ ファイルは通常、DLL がデプロイされているプロジェクトの/bin ディレクトリにあります。または、カスタム IronPdf.Logging.Logger.LogFilePath を設定して、ログ ファイルを特定の場所に保存することもできます。 関連するログファイルには以下が含まれます:
- Default.log: デプロイ、スレッド処理、およびレンダリングプロセスに関する情報が含まれています。 プロセスの動作や例外を観察するのに役立ちます。
- cef.log: Chrome Embedded Frameworkプロセスのログが含まれています。
IronSoftwareEngine.log も含まれる場合があります。 エンジニアリングサポートをリクエストする際には生成されたすべてのログファイルを提出してください。クラウドサーバーでは、ログファイルが特定のディレクトリに配置されている場合があります。 AzureおよびAWSでログファイルを生成するためのガイドを参照してください。

