Skip to content

Commit

Permalink
send out notification regarding user errors (#111)
Browse files Browse the repository at this point in the history
* implement the mechanism to send user errors

* now sends out user error

* now sends out notifications when route segment creation and update are invalid

* now sends out user errors for route node digitized

* improve handling of rollback invalid route node

* can now handle missing work task and missing username

* fix issue not rolling back when missing username or work task

* now seperates delete connected route node and deleting and moving
route node

* now sends error notifications out when trying to delete segment or
node with related equipment

* avoid the message being sent out twice

* fix incorrect error code being returned for route node modified less
than distance

* fix bad sentence
  • Loading branch information
runeanielsen authored Jul 11, 2023
1 parent 38edb47 commit 14ef826
Show file tree
Hide file tree
Showing 17 changed files with 734 additions and 222 deletions.
22 changes: 22 additions & 0 deletions src/OpenFTTH.GDBIntegrator.Config/ErrorCode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace OpenFTTH.GDBIntegrator.Config;

public static class ErrorCode
{
public const string LINE_STRING_IS_INVALID = "LINE_STRING_IS_INVALID";
public const string LINE_STRING_IS_NOT_SIMPLE = "LINE_STRING_IS_NOT_SIMPLE";
public const string LINE_STRING_IS_CLOSED = "LINE_STRING_IS_CLOSED";
public const string LINE_STRING_ENDS_CLOSER_TO_EACH_OTHER_THAN_TOLERANCE = "LINE_STRING_ENDS_CLOSER_TO_EACH_OTHER_THAN_TOLERANCE";
public const string LINE_STRING_ENDS_CLOSER_TO_THE_EDGE_THAN_TOLERANCE = "LINE_STRING_ENDS_CLOSER_TO_THE_EDGE_THAN_TOLERANCE";
public const string ROUTE_SEGMENT_INTERSECTS_WITH_MULTIPLE_START_OR_END_ROUTE_NODES = "ROUTE_SEGMENT_INTERSECTS_WITH_MULTIPLE_START_OR_END_ROUTE_NODES";
public const string RECEIVED_INVALID_MESSAGE = "RECEIVED_INVALID_MESSAGE";
public const string UNKNOWN_ERROR = "UNKNOWN_ERROR";
public const string ROUTE_NODE_INTERSECTS_WITH_ANOTHER_ROUTE_NODE = "ROUTE_NODE_INTERSECTS_WITH_ANOTHER_ROUTE_NODE";
public const string ROUTE_NODE_CANNOT_MODIFY_GEOMETRY_AND_MARK_FOR_DELETION_IN_THE_SAME_OPERATION = "ROUTE_NODE_CANNOT_MODIFY_GEOMETRY_AND_MARK_FOR_DELETION_IN_THE_SAME_OPERATION";
public const string USER_HAS_NOT_SELECTED_A_WORK_TASK = "USER_HAS_NOT_SELECTED_A_WORK_TASK";
public const string MESSAGE_IS_MISSING_USERNAME = "MESSAGE_IS_MISSING_USERNAME";
public const string ROUTE_NODE_GEOMETRY_UPDATE_NOT_ALLOWED_TO_INTERSECT_WITH_ROUTE_SEGMENT = "ROUTE_NODE_GEOMETRY_UPDATE_NOT_ALLOWED_TO_INTERSECT_WITH_ROUTE_SEGMENT";
public const string ROUTE_NODE_INTERSECT_WITH_ROUTE_SEGMENT_CANNOT_BE_DELETED = "ROUTE_NODE_INTERSECT_WITH_ROUTE_SEGMENT_CANNOT_BE_DELETED";
public const string CANNOT_DELETE_ROUTE_NODE_WITH_RELATED_EQUIPMENT = "CANNOT_DELETE_ROUTE_NODE_WITH_RELATED_EQUIPMENT";
public const string CANNOT_DELETE_ROUTE_SEGMENT_WITH_RELATED_EQUIPMENT = "CANNOT_DELETE_ROUTE_SEGMENT_WITH_RELATED_EQUIPMENT";
public const string ROUTE_NODE_MODIFIED_LESS_THAN_TOLERANCE = "ROUTE_NODE_MODIFIED_LESS_THAN_TOLERANCE";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;

namespace OpenFTTH.GDBIntegrator.Integrator.Commands;

public class CannotDeleteRouteNodeRelatedEquipmentException : Exception
{
public CannotDeleteRouteNodeRelatedEquipmentException()
{
}

public CannotDeleteRouteNodeRelatedEquipmentException(string message)
: base(message)
{
}

public CannotDeleteRouteNodeRelatedEquipmentException(string message, Exception inner)
: base(message, inner)
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;

namespace OpenFTTH.GDBIntegrator.Integrator.Commands;

public class CannotDeleteRouteSegmentRelatedEquipmentException : Exception
{
public CannotDeleteRouteSegmentRelatedEquipmentException()
{
}

public CannotDeleteRouteSegmentRelatedEquipmentException(string message)
: base(message)
{
}

public CannotDeleteRouteSegmentRelatedEquipmentException(string message, Exception inner)
: base(message, inner)
{
}
}
Loading

0 comments on commit 14ef826

Please sign in to comment.