Exceptions exceptions... |
Hi Gary,
Any progress? I've just encountered same issue in my project. Details: A user downloads an image from some website that is labeled with a .jpeg extension. It is actually a .heic image (if microsoft paint is to be trusted) and I get an exception during attempted upload. Instead, when this happens, I want to display an info message: "This image type is unsupported/image has additional copyright measures added. You may try and open it in ms paint and re-save it as .jpeg (works 100%)". Instead I get throw ImageException::forInvalidImageCreate('Ima'); in GDHandler.php So far solved like this: PHP Code: try { This code catches ALL exceptions within \CodeIgniter\Images\Exceptions\ImageException How do I display my own message exactly for forInvalidImageCreate?
You can see things I made with codeigniter here: itart.pro its not overly impressive as I have very little time to learn.
|
Messages In This Thread |
Exceptions exceptions... - by Gary - 04-17-2020, 07:07 AM
RE: Exceptions exceptions... - by Leo - 04-19-2020, 02:08 PM
RE: Exceptions exceptions... - by Gary - 04-19-2020, 04:20 PM
RE: Exceptions exceptions... - by Leo - 04-20-2020, 12:12 AM
RE: Exceptions exceptions... - by Gary - 04-20-2020, 02:56 AM
RE: Exceptions exceptions... - by Leo - 04-20-2020, 06:05 AM
RE: Exceptions exceptions... - by Gary - 04-20-2020, 06:52 AM
RE: Exceptions exceptions... - by Leo - 04-20-2020, 10:31 AM
RE: Exceptions exceptions... - by Gary - 04-20-2020, 01:51 PM
|