Skip to content

Commit

Permalink
Geometry error string is not shared
Browse files Browse the repository at this point in the history
Instead move it to a private QgsGeometry member. It's copied
with QgsGeometry, but not the underlying private geometry
data.

This means the error string can be changed without detaching
(and copying) the geometry data.

Also make greater use of error string for all use of GEOS
functions.
  • Loading branch information
nyalldawson committed Aug 30, 2017
1 parent a73c099 commit c2f8a82
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 78 deletions.
7 changes: 4 additions & 3 deletions python/core/geometry/qgsgeometry.sip
Expand Up @@ -1292,10 +1292,11 @@ Returns an extruded version of this geometry.
:rtype: int
%End

QString error() const;
QString lastError() const;
%Docstring
Returns an error string referring to an error that was produced
when this geometry was created.
Returns an error string referring to the last error encountered
either when this geometry was created or when an operation
was performed on the geometry.

.. versionadded:: 3.0
:rtype: str
Expand Down

0 comments on commit c2f8a82

Please sign in to comment.