| @@ -13,8 +13,10 @@ | ||
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | final class Api |
| 16 | 16 | { |
| 17 | + public $app; | |
| 18 | + | |
| 17 | 19 | public function __construct($app) |
| 18 | 20 | { |
| 19 | 21 | $this->app = $app; |
| 20 | 22 | $this->register(); |
| @@ -45,8 +47,8 @@ | ||
| 45 | 47 | { |
| 46 | 48 | try { |
| 47 | 49 | return $this->app[$this->key($key)]; |
| 48 | 50 | } catch(\Exception $e) { |
| 49 | - throw new \Exception("The '$key' doesn't exist in FluentBoardsApi."); | |
| 51 | + throw new \Exception(esc_html(sprintf("The '%s' doesn't exist in FluentBoardsApi.", $key))); | |
| 50 | 52 | } |
| 51 | 53 | } |
| 52 | 54 | } |