You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/08/18 02:11:09 UTC

[GitHub] [incubator-devlake] keon94 commented on a diff in pull request #2763: [feat-2134][framework]: Rework the error management code in the Backend

keon94 commented on code in PR #2763:
URL: https://github.com/apache/incubator-devlake/pull/2763#discussion_r948587535


##########
errors/impl.go:
##########
@@ -0,0 +1,116 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package errors
+
+import "fmt"
+import cerror "github.com/cockroachdb/errors"
+
+type (
+	crdbErrorImpl struct {
+		wrappedRaw error
+		wrapped    *crdbErrorImpl

Review Comment:
   we can potentially split this, into two strings: msg and usrMsg, and have the consumer code specify a custom User msg too optionally. The UserMessage() API would only then return the usrMsg fields if they are not empty



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org