Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

intnine's avatar

How to handle errors?

Sometimes when I'm building my app on a local machine (non laravel php) I need to be sure some script does not returns with error. How can I handle it?

@task('compass', ['on' => 'local'])
    cd /my/build/directory
    compass clean
    compass compile
@endtask

I don't want to deploy the site if some of the commands fails. Any Idea?

0 likes
7 replies
bobbybouwmann's avatar

Well we need to know more about your deploy environment! Otherwise you can always check if it fails locally and don't deploy it right?

intnine's avatar

Right.

The deploy enviromnent is a simple linux. Our custom Zend1 application what I want to deploy with Envoyer.

git checkout branches
merge to a temporary branch
compass clean && compass compile
.....
.....
deploy to preview
deploy to production
bobbybouwmann's avatar

Well I think it doesn't do anything then... Not sure if this is possible though...

intnine's avatar

What if some error occurs with preparing the deployment?

Kryptonit3's avatar

With envoyer it will revert to last commit instantaneously (uses symlink folders) if it senses an error. You can also set a URL to check once done.

Please or to participate in this conversation.