Re: [Tiki-devel] Is this why Exceptions are mostly dead in tiki? And they must be changed with Trowable?

aris002 via TikiWiki-devel <[email protected]>
Newsgroups gmane.comp.cms.tiki.devel
Message-ID <[email protected]>
 
Thanks Marc,
1. Glitch is a very good thing but I guess will it work during tiki installation proccess? About which I am worried mostly at the moment. 2. And to send login data to somewhere  maybe is not the best idea?3. And will it work as it is with the Exception keyword at all because documentiontion says:
catch (Exception $e)
{
   // Executed only in PHP 5, will not be reached in PHP 7
}
PHP: Errors in PHP 7 - Manual


| 
| 
| 
|  |  |

 |

 |
| 
|  | 
PHP: Errors in PHP 7 - Manual


 |

 |

 |


Regards,Aris
    On Monday, 19 July 2021, 23:59:37 EEST, Marc Laporte <[email protected]> wrote:  
 
 Hello Aris,

Not an answer to your question, but here is some information related to error tracking.

Here is a new feature in Tiki23:
* https://dev.tiki.org/GlitchTip
* https://doc.tiki.org/GlitchTip

We'll centralize error messages from various community sites, and this will make it easier to resolve.

We can imagine in the future that each error message shown to end users would have a unique ID, and this will help provide actionable information to developers to solve the problems at the source.

Best regards,

Marc


On Mon, 19 Jul 2021 20:42:20 +0000 (UTC) Tiki developers [email protected] said

> Hi again, 
> 
> Is this why Exceptions are mostly dead in tiki? And they must be changed with
> Trowable? 
> 
> Writing Code to Support PHP 5.x and 7 Exceptions 
> To catch any exception in PHP 5.x and 7 with the same code, multiple catch
> blocks can be used, catching  Throwable  first, then  Exception . Once PHP
> 5.x support is no longer needed, the block catching  Exception  can be
> removed. 
> try { // Code that may throw an Exception or Error. } catch ( Throwable $t )
> { // Executed only in PHP 7, will not match in PHP 5.x } catch ( Exception $e
> ) { // Executed only in PHP 5.x, will not be reached in PHP 7 } 
> Writing catch-all block compatible with both PHP 5.x and 7 
> Unfortunately, type declarations on functions that handle exceptions are not
> as easy to fix. If  Exception  is used as a type declaration on a function
> parameter, the type declaration will need to be removed if the function could
> be called with an instance of  Error . When PHP 5.x support is not required,
> the type declaration can be restored as  Throwable . 
> 
> Thanks, 
> Aris




_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.