2Elm.Native.Error = function(elm) {
4 elm.Native = elm.Native || {};
5 if (elm.Native.Error) return elm.Native.Error;
7 var fromString = Elm.Native.JavaScript(elm).fromString;
9 function indent(lines) {
11 for (var i = 0; i < lines.length; ++i) {
12 msg += '<br/> ' + lines[i];
17 function Case(moduleName, span) {
18 var msg = indent(['Non-exhaustive pattern match in case-expression.',
19 'Make sure your patterns cover every case!']);
20 throw new Error('Runtime error in module ' + moduleName + ' (' + span + '):' + msg);
23 function If(moduleName, span) {
24 var msg = indent(['Non-exhaustive pattern match in multi-way-if expression.',
25 'It is best to use \'otherwise\' as the last branch of multi-way-if.']);
26 throw new Error('Runtime error in module ' + moduleName + ' (' + span + '):' + msg);
29 function raise(str) { throw new Error(fromString(str)); }
31 return elm.Native.Error = { 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