I'm trying to upload a file to s3 with php. I copied this code from GitHub, and after subbing in my credentials it seems to work fine. However there's one part in it that frankly I don't understand and seems to be written wrong.
They use two try statements and three catch blocks. Also they're named differently: one uses S3Exception, and the other uses just Exception. From what I understand S3Exception is correct and you should not have more catches than you do tries. Am I correct in my assumption?
Heres the link to the GitHub: link
} catch (S3Exception $e) {
die('Error:' . $e->getMessage());
} catch (Exception $e) {
die('Error:' . $e->getMessage());
}