Added last DB error

This commit is contained in:
Michael 2020-05-15 12:46:16 +00:00
parent 9a1de3100d
commit 8ca0186409

View file

@ -720,8 +720,7 @@ function item_post(App $a) {
if ($return_path) {
DI::baseUrl()->redirect($return_path);
}
throw new HTTPException\InternalServerErrorException(DI::l10n()->t('Item wasn\'t stored.'));
throw new HTTPException\InternalServerErrorException(DI::l10n()->t('Item wasn\'t stored. Last database error: %d %s', DBA::errorNo(), dba::errorMessage()));
}
$datarray = Item::selectFirst(Item::ITEM_FIELDLIST, ['id' => $post_id]);