* A thin wrapper around shell's 'read' function showing a file name on error.
(fileName)
| 112 | * A thin wrapper around shell's 'read' function showing a file name on error. |
| 113 | */ |
| 114 | readFile(fileName) { |
| 115 | try { |
| 116 | return read(fileName); |
| 117 | } catch (e) { |
| 118 | printErr(`file="${fileName}": ${e.message || e}`); |
| 119 | throw e; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Used for printing error messages. |
no test coverage detected