Changeset 887 for trunk/Modules/Error/Error.php
- Timestamp:
- Nov 20, 2020, 12:08:12 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Error/Error.php
r873 r887 3 3 class ModuleError extends AppModule 4 4 { 5 var $Encoding; 6 var $ShowError; 7 var $UserErrors; 8 var $ErrorHandler; 5 public string $Encoding; 6 public ErrorHandler $ErrorHandler; 9 7 10 function __construct( $System)8 function __construct(System $System) 11 9 { 12 10 parent::__construct($System); … … 19 17 20 18 $this->ErrorHandler = new ErrorHandler(); 19 $this->Encoding = 'utf-8'; 21 20 } 22 21 23 function DoInstall() 22 function DoInstall(): void 24 23 { 25 24 } 26 25 27 function DoUnInstall() 26 function DoUnInstall(): void 28 27 { 29 28 } 30 29 31 function DoStart() 30 function DoStart(): void 32 31 { 33 32 $this->ErrorHandler->ShowError = $this->System->Config['Web']['ShowPHPError']; … … 36 35 } 37 36 38 function DoStop() 37 function DoStop(): void 39 38 { 40 39 $this->ErrorHandler->Stop(); 41 40 } 42 41 43 function DoOnError( $Error)42 function DoOnError(string $Error): void 44 43 { 45 $this->System->ModuleManager->Modules['Log']->NewRecord('Error', 'Log', $Error);44 ModuleLog::Cast($this->System->GetModule('Log'))->NewRecord('Error', 'Log', $Error); 46 45 47 46 //if ($Config['Web']['ErrorLogFile'] != '')
Note:
See TracChangeset
for help on using the changeset viewer.