From e4009c825fd3cc856caf82ee46db3d1b33198988 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 8 May 2017 09:51:52 +0200 Subject: [PATCH] Update README.md --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 035e61f..e1af806 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,19 @@ Pass the absolute path to your Open Tibia server as the first argument of the `E The `parse` method also accepts a second argument for additional attributes (depends on the parser), and a third argument for overriding the default filepath (or providing a specific parser with a filepath). ```php +use Exception; use pandaac\Exporter\Parsers; use pandaac\Exporter\Exporter; -$exporter = new Exporter( - '/home/pandaac/theforgottenserver' -); +try { + $exporter = new Exporter( + '/home/pandaac/theforgottenserver' + ); -$response = $exporter->parse(new Parsers\Weapons); + $response = $exporter->parse(new Parsers\Weapons); +} catch (Exception $e) { + // Handle exceptions as you see fit... +} ``` ## Parsers