Comments (3)
You can use the parse method, or move your try block around the the code where commando is being used, rather than where the command is being defined.
from commando.
PHP doc says: "Attempting to throw an exception from a destructor (called in the time of script termination) causes a fatal error."
So you cannot throw exception here. Of course You can, but dontcatch.
from commando.
Right. If you don't explicitly run your Command, you can't catch the errors since validation wont happen until script termination. That is exactly how it works.
from commando.
Related Issues (20)
- Development appears abandoned. New fork created. HOT 1
- Feature request: Changelog HOT 1
- Command::printHelp() on Windows => file "nil" created with "tput command not found" HOT 1
- Setting an option value via array syntax is not permitted HOT 1
- PHP 8.1.1 - PHP Deprecated Warning ReturnTypeWillChange HOT 1
- Add option for a config file HOT 1
- Unable to parse option values that start with '-', e.g. negative numbers HOT 1
- Help doesn't short circuit HOT 1
- --help "Could not find the specified path" HOT 2
- How do I determine when a flag is actually passed into the cmd session? HOT 2
- Error when value is null
- Autoparsing on get option causes later option rules not to trip HOT 7
- Should be able to define more than one validation rule, and rules should allow for an error message HOT 1
- Feature request: create new `transform` method that both maps and validates values HOT 7
- Feture Request: conflictsWith (oppositive than needs)
- Impossible to read filename or '-' HOT 3
- Multiple valued option - how to? HOT 7
- Add an option to throw an exception or return instead of calling exit() HOT 1
- The main sample is not work
- Get all remaining items HOT 2
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 commando.