[ 
https://issues.apache.org/jira/browse/BEAM-5141?focusedWorklogId=134728&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-134728
 ]

ASF GitHub Bot logged work on BEAM-5141:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Aug/18 21:07
            Start Date: 14/Aug/18 21:07
    Worklog Time Spent: 10m 
      Work Description: akedin commented on a change in pull request #6216: 
[BEAM-5141] Improve error message when SET unregistered options
URL: https://github.com/apache/beam/pull/6216#discussion_r210100516
 
 

 ##########
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionUnexpectedPropertyException.java
 ##########
 @@ -0,0 +1,54 @@
+/*
+ * 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 org.apache.beam.sdk.options;
+
+import java.util.SortedSet;
+
+/** An exception used when encounter unexpected properties. */
+public class PipelineOptionUnexpectedPropertyException extends 
IllegalArgumentException {
+  private static final long serialVersionUID = 3265630128856068164L;
+
+  private String message;
+
+  public PipelineOptionUnexpectedPropertyException(String var1) {
+    super(var1);
+  }
+
+  public void createUnexpectedPropertyExceptionMessage(String propertyName) {
+    message =
+        String.format(
+            "Pipeline option '%s' is not supported in this context. It can be "
+                + "cleared by 'RESET %s'.",
 
 Review comment:
   This does not belong to `java-core`. You should either create another 
exception class for this in SQL, or at least have an ad-hoc message generation 
logic where you wrap this exception

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 134728)
    Time Spent: 2h 50m  (was: 2h 40m)

> Improve error message when SET unregistered options 
> ----------------------------------------------------
>
>                 Key: BEAM-5141
>                 URL: https://issues.apache.org/jira/browse/BEAM-5141
>             Project: Beam
>          Issue Type: Improvement
>          Components: dsl-sql
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to