Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #13065 > unrolled thread

set_error_handler(): duplicate error

Started byalex <1j9448a02@lnx159sneakemail.com.invalid>
First post2021-06-10 11:03 +0200
Last post2022-01-05 00:32 -0800
Articles 2 — 2 participants

Back to article view | Back to comp.programming


Contents

  set_error_handler(): duplicate error alex <1j9448a02@lnx159sneakemail.com.invalid> - 2021-06-10 11:03 +0200
    Re: set_error_handler(): duplicate error Härra Ramob <ya12983@mail.com> - 2022-01-05 00:32 -0800

#13065 — set_error_handler(): duplicate error

Fromalex <1j9448a02@lnx159sneakemail.com.invalid>
Date2021-06-10 11:03 +0200
Subjectset_error_handler(): duplicate error
Message-ID<s9skhf$42b$1@gioia.aioe.org>
<?php
//error_reporting(0);
set_error_handler(
     static function (int $severity, string $message, string $file, int 
$line): void {
         throw new InternalErrorException($message, 0, $severity, $file, 
$line);
     }
);

xxx();

Output:

Fatal error: Uncaught Error: Call to undefined function xxx() in 
/tmp/tmp.Ie1UVhkWcT/test.php on line 9

Error: Call to undefined function xxx() in /tmp/tmp.Ie1UVhkWcT/test.php 
on line 9

Call Stack:
     0.0001     392928   1. {main}() /tmp/tmp.Ie1UVhkWcT/test.php:0

Why error message showing is duplicate?
Furthermore, if uncommenting the error_reporting(0) instruction does not 
show any errors.
is there a good compromise?

[toc] | [next] | [standalone]


#14424

FromHärra Ramob <ya12983@mail.com>
Date2022-01-05 00:32 -0800
Message-ID<cfa4dc04-0daf-489c-bf0a-fb33be1ef35cn@googlegroups.com>
In reply to#13065
Hi....................

Want to make business together?



Mister Kristjan Robam
hrramob@@@@@@mail.ee

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web