You can generate error code table by AppleScript.
--
-- Created by: Takaaki Naganoya
-- Created on: 2019/01/16
--
-- Copyright © 2019 Piyomaru Software, All Rights Reserved
--
use AppleScript version "2.7" -- Mojave (10.14) or later
use framework "Foundation"
use scripting additions
--AppleScript Errors
set erList to {-2700, -2701, -2702, -2703, -2704, -2705, -2706, -2707, -2708, -2709, -2720, -2721, -2729, -2740, -2741, -2750, -2751, -2752, -2753, -2754, -2755, -2760, -2761, -2762, -2763}
--macOS Errors
--{0, -34, -35, -37, -38, -39, -42, -43, -44, -45, -46, -47, -48, -49, -50, -51, -61, -108, -120, -124, -128, -192, -600, -601, -602, -605, -606, -607, -608, -609, -904, -905, -906, -915, -30720}
--AppleEvent Errors
--{-1700, -1701, -1702, -1703, -1704, -1705, -1706, -1707, -1708, -1709, -1710, -1711, -1712, -1713, -1714, -1715, -1716, -1717, -1718, -1719, -1720, -1721, -1723, -1725, -1726, -1727, -1728, -1729, -1730, -1731, -10000, -10001, -10002, -10003, -10004, -10005, -10006, -10007, -10008, -10009, -10010, -10011, -10012, -10013, -10014, -10015, -10016, -10023, -10024, -10025}
--OSA Errors
--{-1750, -1751, -1752, -1753, -1754, -1756, -1757, -1758, -1759, -1761, -1762, -1763}
set mesList to {}
repeat with i in erList
set j to contents of i
set {aNum, aMes} to errorGenerator(j) of me
set the end of mesList to {aNum, aMes}
end repeat
mesList
--> {{-1743, "current applicationにApple Eventsを送信する権限がありません。"}}
on errorGenerator(aNum as number)
set handlerName to "errorGenerator"
try
error number aNum
on error errMsg number ErrNbr partial result partialResult from from_ to to_
return {ErrNbr, errMsg}
end try
end errorGenerator