I need to determine in code that user provided incorrect password and ask to enter correct one. For Aspose.Word and Aspose.Cell all is fine (in past you added such exception type). But Aspose.Slide does not allow me easily determine if password is protected. I need to use such ugly code:
(ex.GetType().FullName == “Aspose.Slides.PptReadException” && ex.InnerException != null && ex.InnerException.GetType().FullName == “System.ApplicationException” && ex.InnerException.Message == “Wrong password.”)
//PPT2007 with wrong password specified
|| (ex.GetType().FullName == “Aspose.Slides.Pptx.PptxReadException” && ex.Message == “Invalid password.”)
//PPT2007 without password specified
|| (ex.GetType().FullName == “System.Exception” && ex.Message.StartsWith(“Presentation is encrypted”))
Would you be so kind to add new Exception type when password is incorrect for presentation?