function createErrorMessage(token, error, name, usesDtcg) {
  const { path, filePath } = token;
  const value = usesDtcg ? token.$value : token.value;
  return `Transform Error: token "${path.join('.')}"${filePath ? ` (${filePath})` : ''} with value: 
  \`${JSON.stringify(value, null, 2)}\` (type: ${typeof value})
could not be transformed by "${name}" transform. Threw the following error: ${error ? `\n\n${error.message}\n${error.stack}` : ''}`;
}
@param {Token} token
@param {Error} error
@param {string} name
@param {boolean} usesDtcg