try { } catch (e : Exception?) { println(1) } catch (e : IOException?) { println(0) }