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-SimpleLog -message $message -type ERROR -category $category
}