functions/Write-SimpleLogException.ps1

function Write-SimpleLogException {
    param (
        [Parameter(Mandatory = $true)]
        [ErrorRecord]$exception,
        [Parameter(Mandatory = $false)]
        [string] $category = "GENERAL"
    )

    $message = "[{0}][F:{1}][L:{2}]" -f  $exception.Exception.GetType().FullName, $exception.InvocationInfo.ScriptName,  $exception.InvocationInfo.ScriptLineNumber
    Write-Log -message $message -type ERROR -
   
}