Closed otherguy closed 3 years ago
@darkwinternight yes my intention was to do this eventually. I like where you're going here but my intention is to do similar to gpgme/PDO and allow setting a generic error mode on the resource. Then let each adapter implement/return as appropriate. Do you have any interest in re-tooling/helping with that effort?
Sure, I can take that on. Want me to leave this pull request open and change the title or do you want to close it and have me submit a new one?
@darkwinternight ok cool. Let me get some scaffolding in place that you can merge in, then you can take over and start implementing in the adapters. I'll ping here with the details after I get something put together.
Thanks!
@darkwinternight have a look at ee0a8dd8d9a77021befd5f18d980450062d622fb
Now we need to come up with some sane rules for what to return when. I've stubbed out a PhpGpg\Exceptions\Exception class which I think all exceptions should return newly created class that extend that base exception.
Hey,
I re-added the exceptions because I think it's better to do the exception handling in the actual app than in the package. Right now, it just returns
false
in case of an exception, taking away any chance of seeing what caused the issue.Let me know what you think.
Cheers!