<commit_before>/*global _, CanvasShapes*/

CanvasShapes.Error = (function () {

    var errors, ErrorClass;

    errors = {
        1001: 'CanvasShapes.Scene - provided config is invalid',
        1002: 'CanvasShapes.Rendering - no arguments passed to `render()`',
        1003: 'CanvasShapes.Point - in `constructor`: coordinates must be passed as an array with min 2 values',
        1004: 'CanvasShapes.SceneLayer - in `constructor`: canvas.getContext() method is not available',
        1005: 'CanvasShapes.Scene - existing dom element must be specified in scene configuration',
        1006: 'CanvasShapes.Scene - nothing to render - no arguments passed',
        1007: "CanvasShapes.SceneLayer - in `constructor`: passed `dom` doesn't exist",
        1008: "CanvasShapes.Point - in `setFace`: provided face doesn't exist",
        1009: "CanvasShapes.ClassAbstract - in `is`: `passedClass` is not a string and doesn't have `className` property",
        1010: "CanvasShapes.GroupAbstract - in `add`: all shapes must implement CanvasShapes.ShapeInterface",
        1011: "CanvasShapes.CoordinatesAbstract - in `validateCoordinates` or `validateCoordinatesArray`: passed coordinates are not valid",
        1012: "CanvasShapes.Scene - this object doesn't implement CanvasShapes.RenderingInterface and can't be rendered",
        1013: "CanvasShapes.Rectangle or CanvasShapes.Square - passed coordinates are not creating 90 degrees angle",
        1014: "CanvasShapes.Square - passed coordinates are not creating 90 degrees angle",
        1015: "CanvasShapes.Square - passed coordinates are not creating a square",
        1016: "CanvasShapes.SceneLayerAbstract - context mandatory but missing",
        1017: "CanvasShapes.SceneLayerAbstract - scene mandatory but missing",
        1018: "CanvasShapes.RenderingAbstract - layer mandatory but missing",
        1019: "CanvasShapes.SceneAbstract - in `newLayer()`: shape is not an instance of CanvasShapes.ShapeInterface",
        1020: "CanvasShapes.SceneAbstract - in `addShape()`: shape is not an instance of CanvasShapes.ShapeInterface",
        1021: "CanvasShapes.SceneAbstract - in `getLayerObject()`: shape is not an instance of CanvasShapes.ShapeInterface",
        1022: "CanvasShapes.SceneAbstract - in `addShape()`: layer is not an instance of CanvasShapes.SceneLayerInterface",
        1023: 'CanvasShapes.Renderer - in `addScene()`: scene is not an instance of CanvasShapes.SceneInterface',
        1024: "CanvasShapes.Arc - in `constructor`: coordinates array is required",
        1025: "CanvasShapes.Arc - in `constructor`: radius is required",
        1026: "CanvasShapes.Point - in `setFace`: provided face is not valid",
        1027: "CanvasShapes.SceneAbstract - in `initialiseListeners`: `this.dom` doesn't exist",
        1028: "CanvasShapes.Event.deregisterCategory - passed category is not a string",
        1029: "CanvasShapes.Event.deregisterCategory - passed category doesn't exist",
        1030: "CanvasShapes.Event.registerCategory - passed category is not a string",
        1031: "CanvasShapes.Event.registerCategory - passed category does exist - use CanvasShapes.Event.deregisterCategory to deregister first",
        1032: "CanvasShapes.Event.registerCategory - passed baseClass is not a function",
        1033: "CanvasShapes.Event.registerCategory - passed eventsObject is not an object",
        1034: "CanvasShapes.Event.registerCategory - passed initialiseListeners is not a function",
        1035: "CanvasShapes.EventAbstract - in `initialise()`: invalid format of `event` argument passed",
        1036: "CanvasShapes.Shape - in `constructor`: wrong format of arguments passed",
        1037: "CanvasShapes.Shape - in `isColliding`: passed `mouseCoordinates` is not in valid format",
        1038: "CanvasShapes.Event.initialiseListeners - passed arugment is not an instance of CanvasShapes.SceneInterface",
        1039: "CanvasShapes.EventAbstract - in `initialise()`: `target` is not a DOM element",
        1040: "CanvasShapes.Event.getCategory - passed `event` is in invalid format",
        1041: "CanvasShapes.Event.Mouse - in `initialise()`: invalid format of `event` argument passed",
        1042: "CanvasShapes.Shape - in `on()`, `off()` or `dispatch()`: shape is not added to a scene yet",
        1043: "CanvasShapes.AnimationFrame - in `constructor`: invalid format of arguments passed",
        1044: "CanvasShapes.SceneAbstract - in `requestRendering()`: shape is not on the layer",
        1045: "CanvasShapes.AnimationAbstract - in `animate()`: invalid format of arguments passed",
        1046: "CanvasShapes.ShapeAbstract - in `setParent()`: invalid format of arguments passed",
        1047: "CanvasShapes.CoordinatesAbstract - in `translateOffsetToCoordinates()`: invalid format of arguments passed",
        1048: "CanvasShapes.StyleAbstract - in `setDefinition()`: invalid format of arguments passed",
        1049: "CanvasShapes.CoordinatesAbstract - in `translateCoordinates()`: invalid format of arguments passed",
        1050: "CanvasShapes.StyleAbstract - in `animate()`: invalid format of arguments passed",
        1051: "CanvasShapes.StyleAbstract - in `getDefinition()`: invalid format of arguments passed",
        1052: "CanvasShapes.StyleAbstract - in `addToShape()`: invalid format of arguments passed",
        1053: "CanvasShapes.Renderer - in `addShapes()`: invalid format of arguments passed",
        1054: "CanvasShapes.SceneLayerAbstract - canvas mandatory but missing",
        1055: "CanvasShapes.SceneLayer - in `initialise()`: invalid format of arguments passed",
        1056: "CanvasShapes.EventAbstract - in `initialise()`: `scene` is not an instance of CanvasShapes.SceneInterface",
        1057: "CanvasShapes.Shape - in `setIsCollidingRatio()`: `isCollidingRatio` should be boolean",
        1058: "CanvasShapes.Polygon - in `isColliding()`: passed `mouseCoordinates` is not in valid format",<commit_msg>Method names in Error.js should always contain brackets<commit_after>/*global _, CanvasShapes*/

CanvasShapes.Error = (function () {

    var errors, ErrorClass;

    errors = {
        1001: 'CanvasShapes.Scene - provided config is invalid',
        1002: 'CanvasShapes.Rendering - no arguments passed to `render()`',
        1003: 'CanvasShapes.Point - in `constructor`: coordinates must be passed as an array with min 2 values',
        1004: 'CanvasShapes.SceneLayer - in `constructor`: canvas.getContext() method is not available',
        1005: 'CanvasShapes.Scene - existing dom element must be specified in scene configuration',
        1006: 'CanvasShapes.Scene - nothing to render - no arguments passed',
        1007: "CanvasShapes.SceneLayer - in `constructor`: passed `dom` doesn't exist",
        1008: "CanvasShapes.Point - in `setFace()`: provided face doesn't exist",
        1009: "CanvasShapes.ClassAbstract - in `is()`: `passedClass` is not a string and doesn't have `className` property",
        1010: "CanvasShapes.GroupAbstract - in `add()`: all shapes must implement CanvasShapes.ShapeInterface",
        1011: "CanvasShapes.CoordinatesAbstract - in `validateCoordinates()` or `validateCoordinatesArray()`: passed coordinates are not valid",
        1012: "CanvasShapes.Scene - this object doesn't implement CanvasShapes.RenderingInterface and can't be rendered",
        1013: "CanvasShapes.Rectangle or CanvasShapes.Square - passed coordinates are not creating 90 degrees angle",
        1014: "CanvasShapes.Square - passed coordinates are not creating 90 degrees angle",
        1015: "CanvasShapes.Square - passed coordinates are not creating a square",
        1016: "CanvasShapes.SceneLayerAbstract - context mandatory but missing",
        1017: "CanvasShapes.SceneLayerAbstract - scene mandatory but missing",
        1018: "CanvasShapes.RenderingAbstract - layer mandatory but missing",
        1019: "CanvasShapes.SceneAbstract - in `newLayer()`: shape is not an instance of CanvasShapes.ShapeInterface",
        1020: "CanvasShapes.SceneAbstract - in `addShape()`: shape is not an instance of CanvasShapes.ShapeInterface",
        1021: "CanvasShapes.SceneAbstract - in `getLayerObject()`: shape is not an instance of CanvasShapes.ShapeInterface",
        1022: "CanvasShapes.SceneAbstract - in `addShape()`: layer is not an instance of CanvasShapes.SceneLayerInterface",
        1023: 'CanvasShapes.Renderer - in `addScene()`: scene is not an instance of CanvasShapes.SceneInterface',
        1024: "CanvasShapes.Arc - in `constructor`: coordinates array is required",
        1025: "CanvasShapes.Arc - in `constructor`: radius is required",
        1026: "CanvasShapes.Point - in `setFace()`: provided face is not valid",
        1027: "CanvasShapes.SceneAbstract - in `initialiseListeners()`: `this.dom` doesn't exist",
        1028: "CanvasShapes.Event.deregisterCategory - passed category is not a string",
        1029: "CanvasShapes.Event.deregisterCategory - passed category doesn't exist",
        1030: "CanvasShapes.Event.registerCategory - passed category is not a string",
        1031: "CanvasShapes.Event.registerCategory - passed category does exist - use CanvasShapes.Event.deregisterCategory to deregister first",
        1032: "CanvasShapes.Event.registerCategory - passed baseClass is not a function",
        1033: "CanvasShapes.Event.registerCategory - passed eventsObject is not an object",
        1034: "CanvasShapes.Event.registerCategory - passed initialiseListeners is not a function",
        1035: "CanvasShapes.EventAbstract - in `initialise()`: invalid format of `event` argument passed",
        1036: "CanvasShapes.Shape - in `constructor`: wrong format of arguments passed",
        1037: "CanvasShapes.Shape - in `isColliding()`: passed `mouseCoordinates` is not in valid format",
        1038: "CanvasShapes.Event.initialiseListeners - passed arugment is not an instance of CanvasShapes.SceneInterface",
        1039: "CanvasShapes.EventAbstract - in `initialise()`: `target` is not a DOM element",
        1040: "CanvasShapes.Event.getCategory - passed `event` is in invalid format",
        1041: "CanvasShapes.Event.Mouse - in `initialise()`: invalid format of `event` argument passed",
        1042: "CanvasShapes.Shape - in `on()`, `off()` or `dispatch()`: shape is not added to a scene yet",
        1043: "CanvasShapes.AnimationFrame - in `constructor`: invalid format of arguments passed",
        1044: "CanvasShapes.SceneAbstract - in `requestRendering()`: shape is not on the layer",
        1045: "CanvasShapes.AnimationAbstract - in `animate()`: invalid format of arguments passed",
        1046: "CanvasShapes.ShapeAbstract - in `setParent()`: invalid format of arguments passed",
        1047: "CanvasShapes.CoordinatesAbstract - in `translateOffsetToCoordinates()`: invalid format of arguments passed",
        1048: "CanvasShapes.StyleAbstract - in `setDefinition()`: invalid format of arguments passed",
        1049: "CanvasShapes.CoordinatesAbstract - in `translateCoordinates()`: invalid format of arguments passed",
        1050: "CanvasShapes.StyleAbstract - in `animate()`: invalid format of arguments passed",
        1051: "CanvasShapes.StyleAbstract - in `getDefinition()`: invalid format of arguments passed",
        1052: "CanvasShapes.StyleAbstract - in `addToShape()`: invalid format of arguments passed",
        1053: "CanvasShapes.Renderer - in `addShapes()`: invalid format of arguments passed",
        1054: "CanvasShapes.SceneLayerAbstract - canvas mandatory but missing",
        1055: "CanvasShapes.SceneLayer - in `initialise()`: invalid format of arguments passed",
        1056: "CanvasShapes.EventAbstract - in `initialise()`: `scene` is not an instance of CanvasShapes.SceneInterface",
        1057: "CanvasShapes.Shape - in `setIsCollidingRatio()`: `isCollidingRatio` should be boolean",
        1058: "CanvasShapes.Polygon - in `isColliding()`: passed `mouseCoordinates` is not in valid format",
{'fraction_non_alphanumeric': 0.10113579422081176, 'fraction_numerical': 0.03958576916652748, 'mean_word_length': 3.850141757796679, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3457589', 'n_tokens_mistral': 3486, 'n_tokens_neox': 3124, 'n_words': 1096}