Clarification on ExceptionTypes Where Recovery is Not Possible Using PdfSaveOptions.setIgnoreError(boolean)

Dear Aspose Support Team,

I would like clarification on which specific Aspose.Cells.ExceptionType values indicate scenarios where recovery is not possible, even when using the PdfSaveOptions.setIgnoreError(true) option.

Based on my understanding, the following types might prevent recovery:

  • FILE_FORMAT
  • INCORRECT_PASSWORD
  • LIMITATION
  • INTERRUPTED
  • IO
  • PERMISSION
  • UNSUPPORTED_STREAM
  • FILE_CORRUPTED

Could you please validate this list? Additionally, are there any other ExceptionType values that make recovery infeasible, or can any of the above still allow partial recovery under certain conditions?

Your insights will help me handle such scenarios more effectively in my application.

Thank you for your support.

Best regards.

@l.alex

Could you please specify if you are looking for a complete list of ExceptionType values or just a validation of the ones you provided?

@l.alex,

Aspose.Cells always tries to continue processing even when certain exceptions are encountered for diverse scenarios. However, some errors are severe enough that they may make recovery process difficult but still the API attempts to make it recover. Still, in rare cases, it ends up getting invalid or corrupted data. Let me try to generically validate your provided ExceptionType values list a bit.

FILE_FORMAT - Occurs due to issues with the file format (e.g., an invalid file format or an unsupported file format). Recovery might be unlikely if the format is unsupported or corrupted beyond repair.

INCORRECT_PASSWORD - This occurs when a file is password-protected and the wrong password is provided. Recovery is possible if the correct password is provided. The document cannot be opened without the password, making recovery infeasible.

LIMITATION - This error happens when you hit MS Excel limitation. In some cases, recovery may be possible though certain content may be lost.

INTERRUPTED - This is typically caused by an external interruption (like the operation being cancelled). Recovery may not be possible.

IO - This occurs if the file becomes invalid. This is generally a recoverable error, as long as the
underlying I/O issue (like permissions or file lock) can be resolved.

PERMISSION - Occurs when the application does not have the necessary permissions to read/open the file. This is typically recoverable if permissions are corrected.

UNSUPPORTED_STREAM - Occurs when a stream in the file is not supported (e.g., a stream type that cannot be processed or is incompatible). In many cases, recovery may still be possible, but data associated with the unsupported stream might be lost a bit.

FILE_CORRUPTED - This refers to file corruption, which may cause structural damage to the file. Corruption is one of the most challenging scenarios for recovery. In many cases, it may not be possible to recover the document fully, though certain parts may be recoverable, depending on the severity of the corruption.

We will still evaluate your requirements thoroughly and provide you with more details on ExceptionType values.

@l.alex,

Please note, PdfSaveOptions.setIgnoreError(true) option ignores exception while rendering chart, image and shape during Excel to PDF conversion. Furthermore, your listed exception types have nothing to do with rendering chart, image and shape during Excel to PDF conversion.

FILE_FORMAT
INCORRECT_PASSWORD
LIMITATION
INTERRUPTED
IO
PERMISSION
UNSUPPORTED_STREAM
FILE_CORRUPTED

@l.alex

To provide more unified and extensible exception handling mechanism, we will mark ‘IgnoreError’ property as obsolete and provide callback(IWarningCallback) for user to handle exceptions according to their business requirement.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-57329

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

For performance consideration, just like the IgnoreError property, currently we only handle exceptions caused by the rendering process of shape, image and chart when saving pdf. In the future we may gradually add handling for other modules and exception types based on users’ requirements.