Commit Graph

13 Commits

Author SHA1 Message Date
Abdullah Tahiri
d7fafbf5a6 Exception: Extension to access debug information and change of line to int type 2017-05-13 15:27:57 +02:00
Abdullah Tahiri
1091511c77 Base::Exception extension
=========================

1. Enable automatic storing of information (function, file, line) when throwing the exception via macro:

Examples:

THROWM(Exception, "BSpline GeoId is out of bounds.")
THROWM(ValueError, "BSpline GeoId is out of bounds.")

THROW(AbortException)

Output:

a) Python Console (what()):
App.ActiveDocument.Sketch004.modifyBSplineKnotMultiplicity(16,3,0)
Traceback (most recent call last):
File "<input>", line 1, in <module>
Base.FreeCADError: FreeCAD exception thrown (BSpline GeoId is out of bounds.)

b) ReportException (report()):
Exception (Thu Apr 27 19:15:24 2017): BSpline GeoId is out of bounds. in bool Sketcher::SketchObject::modifyBSplineKnotMultiplicity(int, int, int) in src/Mod/Sketcher/App/SketchObject.cpp:4102

2. Extend the basic framework so as to allow more control over the mangling of the message introduced by the user, setting the basis to allow, where needed,
 to preserve the original message while allowing full legacy behaviour.

3. Supporting FileDialog reporting as legacy
2017-05-03 22:08:10 +02:00
Abdullah Tahiri
c974e9d752 Exception: Add CADKernelError exception for specialized OCC exception propagation to App::DocumentObject 2017-05-03 22:08:10 +02:00
wmayer
1673ab801e use specialized exception classes 2017-04-28 18:49:11 +02:00
wmayer
f408f3180b fix -Wextra in FreeCADBase 2016-09-21 15:02:02 +02:00
wmayer
f8c0d2f05d + fix possible crash when throw file exception 2016-06-11 16:25:06 +02:00
wmayer
919d47015a + support of drag'n'drop for custom view provider 2015-11-03 16:21:51 +01:00
wmayer
e9594501dd + use dedicated exception classes for expression and parsing errors 2015-09-27 23:17:33 +02:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
f0bf3cb6ab + Proper handling of sketch plane parallel to view direction 2014-09-27 15:53:21 +02:00
wmayer
6fde5d764b + in setPyObject() only use classes derived from Base::Exception 2013-07-05 15:29:04 +02:00
wmayer
857454aad5 0000777: Shared libraries call exit 2012-07-05 15:24:28 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00