Python msgprint raises Exception in the console

i want to prevent the user from saving a Web-form if he has Entered an invalid Entry
When i use the command
frappe.msgprint(" some message",raise_exception = True)

The document is not saved: Good
An Error message is popped up: Good
The web console shows Error: Bad

An Example:

The same javascript command ( frappe.msgprint) do the same thing except it doesn’t raise an Error in the console which is something Good…

Did i miss something?
Is this Normal ?
This is a snapshot of my code

class DOCTYPENAME(Document):
    def validate(self):
   def checksomething(self):
       if certain_condtition:
           frappe.msgprint("Some message", raise_Exception=True)

frappe.throw(" some message")


Same issue… Error is raised when i click the save button…
i have even tested
frappe.msgprint('somemessage' )
i.e without the raise_exception=True argument, but it didn’t work…

This one, Worked For Me. Thanks a lot.

I faced same issue pls tell me how to solve this, i’m not need this console traceback error Its shown full app path this is bad for live production