title: Python - My class raise ValueError, but it is not handled by except
body: <p>My Sample Code:</p>
  
  <pre><code>from tkinter import *
  
  class first:
      def __init__(self):
          self.top = Tk()
          ...
      def test(self):
          try:
              self.value = self.dict[key]
          except KeyError:
              try:
                  second()
              except ValueError:
                  print('Finally')
  
  class second:
      def __init__(self):
          self.frame = Toplevel()
          ...
          self.button = ttk.Button(parent=self.frame, text='GO', command=self.go_click)
          ...
  
      def go_click(self):
          raise ValueError('Not Valid')
  </code></pre>
  
  <p>That´s just an example! The problem is that the ValueError is raised by the second class, but it is not handled by the except clause of the first class. Below the traceback:</p>
  
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
  File "C:\Python34\lib\tkinter\__init__.py", line 1487, in __call__
      return self.func(*args)
  File "........", line xxx, in goclick
      raise ValueError('Not Valid')
  ValueError: Not Valid
  </code></pre>
  
  <p>How can I properly handle it?</p>
  
  <p>Thanks,                   </p>