DSA try catch added