
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com> Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>
18 lines
240 B
Plaintext
18 lines
240 B
Plaintext
[source,php]
|
|
----
|
|
$s = readMyFile($fileName);
|
|
----
|
|
|
|
or
|
|
|
|
[source,php]
|
|
----
|
|
$s = "";
|
|
try {
|
|
$s = readMyFile($fileName);
|
|
} catch (Exception $e) {
|
|
error_log($e->getMessage());
|
|
throw new MyException("an exception occurred", 2, $e);
|
|
}
|
|
----
|