public function execute()
 {
     try {
         parent::execute();
     } catch (waException $ex) {
         echo json_encode(array('error' => $ex->getMessage()));
     }
 }
 static function shutdown()
 {
     if (!empty(self::$instance) && self::$instance instanceof waLongActionController) {
         if (empty(self::$instance->_data['ready'])) {
             self::$instance->_data['complete'] = true;
             self::$instance->_save(true);
         }
     }
 }
 public function execute()
 {
     try {
         parent::execute();
     } catch (waException $ex) {
         if ($ex->getCode() == '302') {
             echo json_encode(array('warning' => $ex->getMessage()));
         } else {
             echo json_encode(array('error' => $ex->getMessage()));
         }
     }
 }
 public static function shutdown()
 {
     if (!empty(self::$instance) && self::$instance instanceof waLongActionController) {
         self::$instance->uncleanShutdown();
         self::$instance = null;
     }
 }