attempt to improve error message display formatting
This commit is contained in:
		
							parent
							
								
									45b3388851
								
							
						
					
					
						commit
						d57c0a7e38
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -72,7 +72,8 @@ export default class logging { | |||
| 	*/ | ||||
| 	static async error(ERROR_CODE, ERROR_MESSAGE, ERROR_STACK, critical = true) { | ||||
| 		// Display the error message.
 | ||||
| 		console.error(texts.localized(`error_msg`, false, [ERROR_CODE, ERROR_MESSAGE, ERROR_STACK])); | ||||
| 		console.error('%c%s%c%s%c%s%c\n%s%c', `font-weight: bold;`, ERROR_CODE, ``, `:`, ``, ERROR_MESSAGE, `font-family: monospace;`, ERROR_STACK, ``); | ||||
| 		 | ||||
| 		try { | ||||
| 			(critical) ? alert(texts.localized(`error_msg_GUI`, false, [String(ERROR_CODE), ERROR_MESSAGE])) : M.toast({ text: ERROR_MESSAGE }); | ||||
| 		} catch(err) {}; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue