source: josm/trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSException.java@ 8086

Last change on this file since 8086 was 6987, checked in by Don-vip, 10 years ago

sonar - fix some more issues

  • Property svn:eol-style set to native
File size: 740 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.mappaint.mapcss;
3
4public class MapCSSException extends RuntimeException {
5
6 protected final String specialmessage;
7 protected Integer line;
8 protected Integer column;
9
10 public MapCSSException(String specialmessage) {
11 this.specialmessage = specialmessage;
12 }
13
14 public void setColumn(int column) {
15 this.column = column;
16 }
17
18 public void setLine(int line) {
19 this.line = line;
20 }
21
22 @Override
23 public String getMessage() {
24 if (line == null || column == null)
25 return specialmessage;
26 return String.format("Error at line %s, column %s: %s", line, column, specialmessage);
27 }
28}
Note: See TracBrowser for help on using the repository browser.