2Elm.Native.Error.make = function(elm) {
3 elm.Native = elm.Native || {};
4 elm.Native.Error = elm.Native.Error || {};
5 if (elm.Native.Error.values) return elm.Native.Error.values;
7 function indent(lines) {
9 for (var i = 0; i < lines.length; ++i) {
10 msg += '<br/> ' + lines[i];
15 function Case(moduleName, span) {
16 var msg = indent(['Non-exhaustive pattern match in case-expression.',
17 'Make sure your patterns cover every case!']);
18 throw new Error('Runtime error in module ' + moduleName + ' (' + span + '):' + msg);
21 function If(moduleName, span) {
22 var msg = indent(['Non-exhaustive pattern match in multi-way-if expression.',
23 'It is best to use \'otherwise\' as the last branch of multi-way-if.']);
24 throw new Error('Runtime error in module ' + moduleName + ' (' + span + '):' + msg);
27 function raise(str) { throw new Error(str); }
29 return elm.Native.Error.values = { Case: Case, If: If, raise: raise };
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list