Skip to content

Commit 00b8d97

Browse files
committed
feature #2 Introduce new StatementIdAlreadyExistsException (Lctrs)
This PR was squashed before being merged into the 0.2.x-dev branch (closes #2). Discussion ---------- Introduce new StatementIdAlreadyExistsException Prepare moving the check for existing statement to the storage layer. Commits ------- ea8ae95 Introduce new StatementIdAlreadyExistsException
2 parents 55f0173 + ea8ae95 commit 00b8d97

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
0.2.0
55
-----
66

7+
* Added `StatementIdAlreadyExistsException`.
78
* Added `UnsupportedStatementVersionException`.
89

910
0.1.1
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the xAPI package.
5+
*
6+
* (c) Christian Flothmann <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Xabbuh\XApi\Common\Exception;
13+
14+
/**
15+
* Statement id already exists exception.
16+
*
17+
* @author Jérôme Parmentier <[email protected]>
18+
*/
19+
class StatementIdAlreadyExistsException extends XApiException
20+
{
21+
public function __construct($statementId, \Exception $previous = null)
22+
{
23+
parent::__construct(sprintf('A statement with ID "%s" already exists.', $statementId), 0, $previous);
24+
}
25+
}

0 commit comments

Comments
 (0)