exercism

Exercism solutions.
git clone git://code.dwrz.net/exercism
Log | Files | Refs

README.md (1845B)


      1 # Error Handling
      2 
      3 Implement various kinds of error handling and resource management.
      4 
      5 An important point of programming is how to handle errors and close
      6 resources even if errors occur.
      7 
      8 This exercise requires you to handle various errors. Because error handling
      9 is rather programming language specific you'll have to refer to the tests
     10 for your track to see what's exactly required.
     11 
     12 
     13 Run the tests with:
     14 
     15 ```bash
     16 bats error_handling_test.sh
     17 ```
     18 
     19 After the first test(s) pass, continue by commenting out or removing the
     20 `[[ $BATS_RUN_SKIPPED == true ]] || skip` 
     21 annotations prepending other tests.
     22 
     23 To run all tests, including the ones with `skip` annotations, run:
     24 
     25 ```bash
     26 BATS_RUN_SKIPPED=true bats error_handling_test.sh
     27 ```
     28 
     29 
     30 
     31 ## External utilities
     32 `Bash` is a language to write "scripts" -- programs that can call
     33 external tools, such as
     34 [`sed`](https://www.gnu.org/software/sed/),
     35 [`awk`](https://www.gnu.org/software/gawk/),
     36 [`date`](https://www.gnu.org/software/coreutils/manual/html_node/date-invocation.html)
     37 and even programs written in other programming languages, 
     38 like [`Python`](https://www.python.org/).
     39 This track does not restrict the usage of these utilities, and as long
     40 as your solution is portable between systems and does not require
     41 installation of third party applications, feel free to use them to solve
     42 the exercise.
     43 
     44 For an extra challenge, if you would like to have a better understanding
     45 of the language, try to re-implement the solution in pure `Bash`,
     46 without using any external tools. Note that there are some types of
     47 problems that bash cannot solve, such as performing floating point
     48 arithmetic and manipulating dates: for those, you must call out to an
     49 external tool.
     50 
     51 ## Submitting Incomplete Solutions
     52 It's possible to submit an incomplete solution so you can see how others
     53 have completed the exercise.