strict and scream modes together

3 years ago

adrianbj
Member | 28
+
0
-

Hi everyone,

Just started using Tracy and loving it, but noticed what I think is an issue with strict and scream modes together. It comes from /tracy/src/Tracy/Bar.php:59 where you are using the shutup operator to ignore a session_start error. Because this is always shown it prevents seeing other errors.

3 years ago

CZechBoY
Member | 3363
+
0
-
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}

3 years ago

adrianbj
Member | 28
+
0
-

@CZechBoY – agreed the core Tracy code certainly should do something other than using “@” in this case. Since I am new here, are Nette staff responsive here, or should we submit a PR with a fix?

3 years ago

David Grudl
Nette Core | 6850
+
0
-

Scream mode is intended only for catching hidden error, not for normal usage. In code are tons of @ and they are documented and needed.

3 years ago

adrianbj
Member | 28
+
0
-

I am actually wondering about the combo of strict and scream. It seems to me that while it might be useful to show warnings/notices etc that are silenced via @, I don't see much point having them in scream mode. I'd rather they were just in the debug bar, but to make that happen, I can't force scream mode for normal warnings/notices. Any thoughts on maybe tweaking this behavior / options slightly?

3 years ago

adrianbj
Member | 28
+
0
-

Hi David,

Thanks for your response. The problem as I see it is that we shouldn't be seeing @errors that are from the core Tracy code. Would it be possible to ignore those?