//..............................................................................
//
// Some standard checksums collected via selection processors
//

import "log.jnc"

namespace log {

//..............................................................................

addDeviceMonCaptureErrorDetails (
	RepresenterTarget* target,
	std.Error const* error
	)
{
	char const* url;

	if (error.m_guid == std.g_winErrorGuid)
		switch (error.m_code)
		{
		case 2: // ERROR_FILE_NOT_FOUND
			url = "http://ioninja.com/doc/kb/tdevmon_windows_file_not_found.html";
			break;

		case 5: // ERROR_ACCESS_DENIED
			url = "http://ioninja.com/doc/kb/tdevmon_windows_access_denied.html";
			break;
		}
	else if (error.m_guid == std.g_errnoGuid)
		switch (error.m_code)
		{
		case 2: // ENOENT
			url = "http://ioninja.com/doc/kb/tdevmon_linux_enoent.html";
			break;

		case 1: // EPERM
			url = "http://ioninja.com/doc/kb/tdevmon_linux_eperm.html";
			break;
		}

	if (url)
		target.addHyperText ($"Read this \e^$url\e[4;34mKB article\e[m for more details");
}

//..............................................................................

} // namespace log
