FrankChen021 commented on issue #13123:
URL: https://github.com/apache/druid/issues/13123#issuecomment-1257389641

   A builder pattern is friendly for developers. It's a nice API.
   
   ```java
     throw DruidException
         .userError()
         .error(DruidException.INVALID_SQL)
         .message(“The table ‘%s’ is not defined in schema ‘%s’.", tableName, 
schemaName)
         .context("location", "Line %d, column %d", node.lineNo, node.columnNo)
         .build();
   ```
   
   Take this as an example, I actually don't understand the difference of 
`message` and `context` even though I know the literal meaning of these two 
words. I mean sometimes it's confusion for developers to figure out whether we 
should put the information in the `context` or `message`. When to use `message` 
and when to use `context`? We can of course put the `location` information 
above in the `message` too. 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to