Blog
リファレンス(仕様詳細) » Framework Exceptions (list of error codes)

Framework Exceptions (list of error codes)

Last modified by kashi on 2015/02/02, 10:23

Hifive will throw errors based on the rules below. Framework Exceptions will always contain a code allowing for identification of error type.

Rules for Framework Exceptions

 

Framework Exceptions

  • An error will be thrown when the application encounters conditions not usually allowed or when an invalid parameter is passed to a function
    • Exceptions to the above rule :
      • When returning null is preferable to throwing an exception
      • When discontinuing the function’s processing is preferable to throwing an exception
  • The main purpose of exceptions is supporting fast, simple debugging during implementation
    *Exception objects generated by the framework must have the code’s property and contain a code value which will allow the developer to determine what type of error it is
    • Depending on the type of error, some exceptions have the detail property that is used to offer further error context
  • Some exceptions contain the error message in the message property. However, in the minified version the message is sometimes omitted to reduce file size so error type should be deciphered by checking the error code and not the error message

Summary of Error Codes (by module)

The error codes used by hifive are separated by module type. For example, the h5.ajax module uses error codes from 1000 to 1999.

In General error codes are classified by module type. Some modules are comprised of multiple files, in those cases an error code of the same lineage will be used.

h5.ajax (1000 - 1999)

h5.api.geo (2000 - 2999)

h5.api.sqldb (3000 - 3999)

h5.api.storage (4000 - 4999)

h5.async (5000 - 5999)

h5.core.controller (6000 - 6999)

h5.core.data (15000 - 15099)

h5.core.data_observables (15100 - 15199)

Note : In version1.1.0 codes 17000-17999 were reserved for h5.core.data_observables but, in accordance with an error code policy update, from version 1.1.1 the codes 15100 - 15199 will be used.

Data model schema errors (15800 - 15899)

Data model descriptor errors (15900 - 15999)

h5.core.view (7000 - 7099)

h5.core.view_binding (7100 - 7199)

Note : In ver.1.1.0 codes 16000-16999 were reserved for h5.core.view_binding but, in accordance with an error code policy update, from version 1.1.1 the codes 7100 - 7199 will be used.

h5.env (8000 - 8999)

 

h5 (9000 - 9999)

 

h5.log (10000 - 10999)

 

h5.u (11000 - 11999)

 

h5.ui.jqm (12000 - 12999)

 

h5.ui (13000 - 13999)

 

h5.dev.api.geo (14000 - 14999)

 

h5scopedglobals (top) (100-199)

 


Copyright (C) 2012-2017 NS Solutions Corporation, All Rights Reserved.