Comments (8)
And there also is no other way to detect this failure? Does the function return an error (string) perhaps?
from php-sdk.
Yes I can get this error as string and this message Could not resolve host: api2.transloadit.com
I got from
$transloadit->createAssembly
But is better you use Exception to manager errors ...
What I was thinking ....
Default Exception
class TransloaditException extends Exception {}
Into createAssembly
public function createAssembly()
{
try {
...... your logic
catch(\Exception $exception) {
throw new TransloaditException()
}
}
When you need to use the createAssembly
method
try {
$transloadit->createAssembly()
catch(TransloaditException $exception) {
you do something .....
}
from php-sdk.
There was a time that folks were skeptical about using exceptions in PHP but i gauge that time is well behind us now. I'm open to this change, if @tim-kos is too, but likely we don't have the time to do this anytime soon, would you be open to PRing @eerison?
from php-sdk.
Sure @kvz I'm forking your project and start to contribute with your project!
from php-sdk.
Yep sounds good! Looking forward to your PR!
from php-sdk.
Is this something you'd still like to attack @eerison or should we close the issue?
from php-sdk.
I think it's good to continue open, to help to track what we need to do
from php-sdk.
it will be resolved in this Pull request: #34
from php-sdk.
Related Issues (20)
- Method for passing files to be uploaded is deprecated HOT 3
- Doesn't work for PHP 5.6.15? HOT 2
- Deprecation warning HOT 6
- Add `Transloadit-Client: php-sdk:<version>` header to each request
- Implement "waitForCompletion" parameter for the createAssembly function
- Relative path breaks implementation on missing version HOT 2
- Request async HOT 4
- What do you think to split the createAssembly in two methods? HOT 2
- Update example of using jQuery SDK to using Uppy instead. HOT 4
- proposal for new major HOT 15
- If using 'tmp_file' you will need to use move_uploaded_file() first HOT 4
- add uploaded files to assembly HOT 2
- Fix pipelines HOT 3
- Remove files not used HOT 3
- Coverage analisys HOT 5
- Test skipped HOT 3
- Is it still maintained? HOT 1
- Make timeouts configurable
- Signatures NEVER match. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-sdk.