Skip to content

Commit 8d5e9ab

Browse files
replaced Exception with LogicException (#15)
1 parent a12178d commit 8d5e9ab

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/Columns/AbstractColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function setOptions($options)
8989

9090
if ($this->isSearchable()) {
9191
if ((is_null($this->internalOptions["search"]) && is_null($this->internalOptions["filter"]))) {
92-
throw new \Exception("Column is searchable but no filter or custom search is set. Column: " . $this->getDql());
92+
throw new \LogicException("Column is searchable but no filter or custom search is set. Column: " . $this->getDql());
9393
}
9494
}
9595

src/Columns/BooleanColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function buildData($entity)
4545
}
4646

4747
if (!is_bool($booleanValue)) {
48-
throw new \Exception("Value should be boolean. Type: " . gettype($booleanValue));
48+
throw new \LogicException("Value should be boolean. Type: " . gettype($booleanValue));
4949
}
5050

5151
return $this->outputOptions[$booleanValue ? 'trueLabel' : 'falseLabel'];

src/Columns/DateTimeColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function buildData($entity)
3535
}
3636

3737
if (!$dateTime instanceof \DateTime) {
38-
throw new \Exception("DateTimeColumn :: Property should be DateTime. Type: " . gettype($dateTime));
38+
throw new \LogicException("DateTimeColumn :: Property should be DateTime. Type: " . gettype($dateTime));
3939
}
4040

4141
return $dateTime->format($this->outputOptions['format']);

src/HelloBootstrapTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function createView()
161161

162162
if ($this->tableOptions['enableCheckbox']) {
163163
if (!$this->columnBuilder->getColumnByField($this->tableOptions['bulkIdentifier'])) {
164-
throw new \Exception("Field for bulk identifier not found in columns. Given identifier: " . $this->tableOptions['bulkIdentifier']);
164+
throw new \LogicException("Field for bulk identifier not found in columns. Given identifier: " . $this->tableOptions['bulkIdentifier']);
165165
}
166166

167167
array_unshift($columns, array("checkbox" => true));

src/HelloBootstrapTableFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ public function create($helloTable, $options = array())
5252
if (!\is_string($helloTable)) {
5353
$type = \gettype($helloTable);
5454

55-
throw new \Exception("HelloBootstrapTableFactory::create(): String expected, {$type} given");
55+
throw new \LogicException("HelloBootstrapTableFactory::create(): String expected, {$type} given");
5656
}
5757

5858
if (false === class_exists($helloTable)) {
59-
throw new \Exception("HelloBootstrapTableFactory::create(): {$helloTable} does not exist");
59+
throw new \LogicException("HelloBootstrapTableFactory::create(): {$helloTable} does not exist");
6060
}
6161

6262
return new $helloTable(

0 commit comments

Comments
 (0)