bash-oo-framework icon indicating copy to clipboard operation
bash-oo-framework copied to clipboard

Try/Catch syntax error

Open djob opened this issue 7 years ago • 1 comments

Hi,

i'm trying to implement try/catch util but no success so far.

Following code

try {
    # many lines of code
} catch {
   # Handling error
}

Gives me an error: script.sh: syntax error near unexpected token }' script.sh: line 159: } catch {'

Any clue what's wrong with try catch syntax and/or implementation?

djob avatar May 25 '18 19:05 djob

Have you included util/exception util/tryCatch?

rbukovansky avatar Jul 03 '18 15:07 rbukovansky