Initialised using block
modified,used block_given? and also added exception handling code
added Exception class