import { Notice } from "obsidian" ; import { TemplaterError } from "./Error" ; export function log_update ( msg ) { const notice = new Notice ( "" , 15000 ) ; notice . noticeEl . innerHTML = `<b>Templater update</b>:<br/>${ msg }` ; } export function log_error ( e ) { const notice = new Notice ( "" , 8000 ) ; if ( e instanceof TemplaterError && e . console_msg ) { notice . noticeEl . innerHTML = `<b>Templater Error</b>:<br/>${ e . message }<br/>Check console for more informations` ; console . error ( `Templater Error:` , e . message , "\n" , e . console_msg ) ; } else { notice . noticeEl . innerHTML = `<b>Templater Error</b>:<br/>${ e . message }` ; } }