Display exceptions from plugins while refreshing board
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Kanboard\Controller;
|
namespace Kanboard\Controller;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
use Kanboard\Core\Controller\AccessForbiddenException;
|
use Kanboard\Core\Controller\AccessForbiddenException;
|
||||||
use Kanboard\Model\UserMetadataModel;
|
use Kanboard\Model\UserMetadataModel;
|
||||||
|
|
||||||
@@ -32,6 +33,7 @@ class BoardAjaxController extends BaseController
|
|||||||
throw new AccessForbiddenException(e("You don't have the permission to move this task"));
|
throw new AccessForbiddenException(e("You don't have the permission to move this task"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$result =$this->taskPositionModel->movePosition(
|
$result =$this->taskPositionModel->movePosition(
|
||||||
$project_id,
|
$project_id,
|
||||||
$values['task_id'],
|
$values['task_id'],
|
||||||
@@ -45,6 +47,9 @@ class BoardAjaxController extends BaseController
|
|||||||
} else {
|
} else {
|
||||||
$this->response->html($this->renderBoard($project_id), 201);
|
$this->response->html($this->renderBoard($project_id), 201);
|
||||||
}
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->response->html('<div class="alert alert-error">'.$e->getMessage().'</div>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user