/**
 * @author Andy Gup
 *
 * Copyright 2016 Esri
 * Licensed 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 com.esri.cordova.geolocation.utils;

/**
 * This is a central repository for managing error messages and reducing duplication.
 */
public class ErrorMessages {

    // Location request errors are 100 series
    public static final String NETWORK_UNAVAILABLE = "ERROR 101: Network location requested but network is not available";
    public static final String GPS_UNAVAILABLE = "ERROR 102: GPS location requested but GPS is not available";
    public static final String CELLDATA_UNAVALABLE = "ERROR 103: Cell data requested but unavailable. Check internet connection";
    public static final String LOCATIONSERVICES_UNAVAILABLE = "ERROR 104: Neither GPS nor network location is available";

    // Configuration errors are 900 series
    public static final String INCORRECT_CONFIG_ARGS = "ERROR 901: There was a problem with the optional configuration arguments";
}

@@ -872,19 +872,37 @@
  = %22
-ERROR 101: 
+%7B%5C%22err%5C%22: %5C%22101%5C%22, %5C%22msg%5C%22:%5C%22
 Netw
@@ -944,32 +944,35 @@
 is not available
+%5C%22%7D
 %22;%0A    public st
@@ -1012,19 +1012,37 @@
  = %22
-ERROR 102: 
+%7B%5C%22err%5C%22: %5C%22102%5C%22, %5C%22msg%5C%22:%5C%22
 GPS 
@@ -1084,16 +1084,19 @@
 vailable
+%5C%22%7D
 %22;%0A    p
@@ -1148,19 +1148,37 @@
  = %22
-ERROR 103: 
+%7B%5C%22err%5C%22: %5C%22103%5C%22, %5C%22msg%5C%22:%5C%22
 Cell
@@ -1235,16 +1235,171 @@
 nnection
+%5C%22%7D%22;%0A    public static final String CELLDATA_NOT_ALLOWED = %22%7B%5C%22err%5C%22: %5C%22104%5C%22, %5C%22msg%5C%22:%5C%22Cell Data option is not available on Android API versions %3C 18%5C%22%7D
 %22;%0A    p
@@ -1432,16 +1432,17 @@
 LOCATION
+_
 SERVICES
@@ -1461,19 +1461,37 @@
  = %22
-ERROR 104: 
+%7B%5C%22err%5C%22: %5C%22105%5C%22,%5C%22msg%5C%22: %5C%22
 Neit
@@ -1531,16 +1531,19 @@
 vailable
+%5C%22%7D
 %22;%0A%0A    
@@ -1641,19 +1641,38 @@
  = %22
-ERROR 901: 
+%7B%5C%22err%5C%22: %5C%22901%5C%22, %5C%22msg%5C%22: %5C%22
 Ther
@@ -1728,13 +1728,16 @@
 rguments
+%5C%22%7D
 %22;%0A%7D%0A

reformat error messages for parsing