omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Truncated Text - when raising errors

    Pythonista
    raise error truncated display
    2
    5
    4278
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Phuket2
      Phuket2 last edited by Phuket2

      When raising an error, I don't see all the text I have sent , it's truncated . Is there a way I can see all the error text without disrupting Pythonista's traceback functionality? I know I can do something like a console.alert, but I will not get the traceback and pointers etc

      1 Reply Last reply Reply Quote 0
      • Webmaster4o
        Webmaster4o last edited by

        try:
            #code that raises the error
        except Exception, e:
            print e
        Phuket2 1 Reply Last reply Reply Quote 0
        • Phuket2
          Phuket2 @Webmaster4o last edited by

          @Webmaster4o , but my error is like this

          if not all(k in pyui_rec for k in pyui_descriptor):
          			err_str = '''the pyui_rec does not contain 
          							all the keys check dict - pyui_descriptor {}'''
          			raise TypeError(err_str.format(pyui_descriptor))
          
          1 Reply Last reply Reply Quote 0
          • Webmaster4o
            Webmaster4o last edited by

            Well, can't you just

            print err_str.format(pyui_descriptor)
            Phuket2 1 Reply Last reply Reply Quote 0
            • Phuket2
              Phuket2 @Webmaster4o last edited by

              @Webmaster4o , ok, great. Thanks that works. You still get the traceback error. But you still need to know to look at the console to see all the error text. But I can modify the error text to say more information in the console, just put it at the top to make sure they see that part of the msg. But of course the more information you can return as an error the better I think

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              Powered by NodeBB Forums | Contributors