epoc32/include/e32kpan.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
// e32\include\e32kpan.h
williamr@2
    15
// Kernel-generated panic codes
williamr@2
    16
// 
williamr@2
    17
//
williamr@2
    18
williamr@2
    19
#ifndef __E32KPAN_H__
williamr@2
    20
#define __E32KPAN_H__
williamr@2
    21
#include <e32def.h>
williamr@2
    22
williamr@2
    23
/**
williamr@2
    24
@publishedAll
williamr@2
    25
@released
williamr@2
    26
williamr@2
    27
These panics represent program errors detected by the Kernel.
williamr@2
    28
Typically, they are caused by passing bad or contradictory parameters
williamr@2
    29
to functions. Threads that cause exceptions also raise a KERN-EXEC type panic.
williamr@2
    30
*/
williamr@2
    31
enum TKernelPanic
williamr@2
    32
    {
williamr@2
    33
    
williamr@2
    34
    /**
williamr@2
    35
    This panic is raised when the Kernel cannot find an object in
williamr@2
    36
    the object index for the current process, or current thread, using
williamr@2
    37
    a specified object index number (the raw handle number).
williamr@2
    38
    */
williamr@2
    39
	EBadHandle=0,
williamr@2
    40
	
williamr@2
    41
	/**
williamr@2
    42
	This is a general panic raised as a result of attempting 
williamr@2
    43
	some unauthorised activity such as trying to suspend a thread,
williamr@2
    44
	or trying to set the priority of a thread, when not authorised to do so.
williamr@2
    45
	*/
williamr@2
    46
	EAccessDenied=1,
williamr@2
    47
	
williamr@2
    48
	/**
williamr@2
    49
	This panic is raised by the kernel when opening a kernel side object,
williamr@2
    50
	a DObject type, and the fullname is invalid.
williamr@2
    51
	*/
williamr@2
    52
	EBadName=2,
williamr@2
    53
	
williamr@2
    54
	/**
williamr@2
    55
	This panic is raised when an unhandled exception occurs.
williamr@2
    56
	Exceptions have many causes, but the most common are access violations
williamr@2
    57
	caused, for example, by dreferencing NULL.
williamr@2
    58
	
williamr@2
    59
	Among other possible causes are:
williamr@2
    60
	general protection faults, executing an invalid instruction,
williamr@2
    61
	alignment checks, etc.
williamr@2
    62
	*/
williamr@2
    63
	ECausedException=3,
williamr@2
    64
	
williamr@2
    65
	/**
williamr@2
    66
	Not used.
williamr@2
    67
	*/
williamr@2
    68
	ECompletion=4,
williamr@2
    69
	
williamr@2
    70
	/**
williamr@2
    71
	Not used.
williamr@2
    72
	*/
williamr@2
    73
	ELeaveWithoutTrap=5,
williamr@2
    74
	
williamr@2
    75
	/**
williamr@2
    76
	This panic is raised by the kernel when a handle to a code segment
williamr@2
    77
	is invalid.
williamr@2
    78
	*/
williamr@2
    79
	EBadCodeSegHandle=6,
williamr@2
    80
	
williamr@2
    81
	/**
williamr@2
    82
	Not used.
williamr@2
    83
	*/
williamr@2
    84
	ESegmentWriteOutOfRange=7,
williamr@2
    85
	
williamr@2
    86
	/**
williamr@2
    87
	Not used.
williamr@2
    88
	*/
williamr@2
    89
	EChunkSizeTooBig=8,
williamr@2
    90
	
williamr@2
    91
	/**
williamr@2
    92
	This is a general panic raised by the kernel when an attempt
williamr@2
    93
	is made to issue a request when one is already outstanding, and only one
williamr@2
    94
    outstanding request is permitted at any one time.
williamr@2
    95
	*/
williamr@2
    96
	ERequestAlreadyPending=9,
williamr@2
    97
	
williamr@2
    98
	/**
williamr@2
    99
	This panic is raised by the Request() member function of
williamr@2
   100
	the DLogicalChannel() kernel object when the request number passed
williamr@2
   101
	to the function is smaller than the permitted minimum.
williamr@2
   102
	
williamr@2
   103
	@see DLogicalChannel::EMinRequestId
williamr@2
   104
	*/
williamr@2
   105
	ERequestNoInvalid=10,
williamr@2
   106
	
williamr@2
   107
	/**
williamr@2
   108
	This panic is raised when creating a logical channel, and the unit number
williamr@2
   109
	is outside the permitted range.
williamr@2
   110
	
williamr@2
   111
	If unit numbers are not permmitted, the unit number value
williamr@2
   112
	must be KNullUnit.
williamr@2
   113
	If unit numbers are permitted, the unit number value must
williamr@2
   114
	be less than KMaxUnits.
williamr@2
   115
	*/
williamr@2
   116
	EBadUnitNumber=11,
williamr@2
   117
	
williamr@2
   118
	/**
williamr@2
   119
	This panic is raised by the kernel if an event capture
williamr@2
   120
	hook has already been designated.
williamr@2
   121
	*/
williamr@2
   122
	EEventAlreadyCaptured=12,
williamr@2
   123
	
williamr@2
   124
	/**
williamr@2
   125
	This panic is raised by the kernel if the current thread is not
williamr@2
   126
	the designated event capture hook.
williamr@2
   127
	*/
williamr@2
   128
	EEventNotCaptured=13,
williamr@2
   129
	
williamr@2
   130
	/**
williamr@2
   131
	This panic is raised when an attempt is made to set the priority of
williamr@2
   132
	a thread or process to an illegal value.
williamr@2
   133
	*/
williamr@2
   134
	EBadPriority=14,
williamr@2
   135
	
williamr@2
   136
	/**
williamr@2
   137
	This panic is raised when a timer event is requested from an asynchronous
williamr@2
   138
	timer service, an RTimer, and a timer event is already outstanding.
williamr@2
   139
	It is caused by calling either the At(), After() or Lock() member functions
williamr@2
   140
	after a previous call to any of these functions but before the timer event
williamr@2
   141
	requested by those functions has completed.
williamr@2
   142
	*/
williamr@2
   143
	ETimerAlreadyPending=15,
williamr@2
   144
	
williamr@2
   145
	/**
williamr@2
   146
	Not used.
williamr@2
   147
	*/
williamr@2
   148
	EAlreadyLoggedOn=16,
williamr@2
   149
	
williamr@2
   150
	/**
williamr@2
   151
	The panic is raised if kernel heap checking has failed.
williamr@2
   152
	*/
williamr@2
   153
	EFailedKernelHeapCheck=17,
williamr@2
   154
	
williamr@2
   155
	/**
williamr@2
   156
	Not used.
williamr@2
   157
	*/
williamr@2
   158
	ERequestFromWrongThread=18,
williamr@2
   159
williamr@2
   160
    /**
williamr@2
   161
    This panic is raised by the Kernel when a server program issues a request
williamr@2
   162
    to receive a message, i.e. when it calls the Receive() member function
williamr@2
   163
    of RServer, the handle to the Kernel side server object.
williamr@2
   164
    
williamr@2
   165
    The panic occurs when a receive message request has previously been made
williamr@2
   166
    and is still outstanding.
williamr@2
   167
    */
williamr@2
   168
	EMesAlreadyPending=19,
williamr@2
   169
	
williamr@2
   170
	/**
williamr@2
   171
	This panic is raised by the Kernel when a request for an event
williamr@2
   172
	(as originated by a call to UserSvr::RequestEvent()) is made while
williamr@2
   173
	a previously made request is still outstanding.
williamr@2
   174
	*/
williamr@2
   175
	EEventRequestPending=20,
williamr@2
   176
	
williamr@2
   177
	/**
williamr@2
   178
	Not used.
williamr@2
   179
	*/
williamr@2
   180
	EIllegalWsProcess=21,
williamr@2
   181
	
williamr@2
   182
	/**
williamr@2
   183
	Not used.
williamr@2
   184
	*/
williamr@2
   185
	EHardwareNotAvailable=22,
williamr@2
   186
	
williamr@2
   187
	/**
williamr@2
   188
	This panic is raised when attempting to create a session with a server,
williamr@2
   189
	and access is been denied.
williamr@2
   190
	*/
williamr@2
   191
	EUnsharableSession=23,
williamr@2
   192
	
williamr@2
   193
	/**
williamr@2
   194
	This panic is raised when writing global DLL data, and the length of
williamr@2
   195
	data to be written is greater than the space available.
williamr@2
   196
	*/
williamr@2
   197
	EDesOverflow=24,
williamr@2
   198
	
williamr@2
   199
	/**
williamr@2
   200
	This panic is raised when searching for objects, using the internal
williamr@2
   201
	function TFindHandleBase::NextObject(), and an invalid object type
williamr@2
   202
	is specified.
williamr@2
   203
	*/
williamr@2
   204
	EBadObjectType=25,
williamr@2
   205
	
williamr@2
   206
	/**
williamr@2
   207
	This panic is raised by kernel side code that implements heap debugging
williamr@2
   208
	behaviour, when a specific debug request is not recognised.
williamr@2
   209
	*/
williamr@2
   210
	EBadKernelHeapDebugFunction=26,
williamr@2
   211
	
williamr@2
   212
	/**
williamr@2
   213
	This panic is raised when an executive call is made with an invalid call
williamr@2
   214
	number.
williamr@2
   215
	*/
williamr@2
   216
	EInvalidSystemCall=27,
williamr@2
   217
	
williamr@2
   218
	/**
williamr@2
   219
	Not used.
williamr@2
   220
	*/
williamr@2
   221
	ESetSessionPtrInvalidMessage=28,
williamr@2
   222
	
williamr@2
   223
	/**
williamr@2
   224
	Not used.
williamr@2
   225
	*/
williamr@2
   226
	ECompleteDisconnectInvalidMessage=29,
williamr@2
   227
	
williamr@2
   228
	/**
williamr@2
   229
	This panic is raised when an attempt is being made to send 
williamr@2
   230
	a synchronous message to a server more than once, using
williamr@2
   231
	the current thread's dedicated synchronous message.
williamr@2
   232
	*/
williamr@2
   233
	ESyncMsgSentTwice=30,
williamr@2
   234
	
williamr@2
   235
	/**
williamr@2
   236
	Not used.
williamr@2
   237
	*/
williamr@2
   238
	EAutoAttachFailed=31,
williamr@2
   239
	
williamr@2
   240
	/**
williamr@2
   241
	This panic is called by DProcess::Resume() when trying to resume
williamr@2
   242
	a process that is still being loaded.
williamr@2
   243
	*/
williamr@2
   244
	EProcessNotLoaded=32,
williamr@2
   245
	
williamr@2
   246
	/**
williamr@2
   247
    This panic is raised in a call to Kern::KUDesInfo(), Kern::KUDesPut() etc
williamr@2
   248
    when an invalid descriptor is passed.
williamr@2
   249
	*/
williamr@2
   250
	EKUDesInfoInvalidType=33,
williamr@2
   251
	
williamr@2
   252
	/**
williamr@2
   253
	This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut()
williamr@2
   254
	when the descriptor passed to it is not a modifiable type.
williamr@2
   255
	*/
williamr@2
   256
	EKUDesSetLengthInvalidType=34,
williamr@2
   257
	
williamr@2
   258
	/**
williamr@2
   259
	This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut()
williamr@2
   260
	when the length of the source descriptor is longer than the length of
williamr@2
   261
	the target descriptor.
williamr@2
   262
	*/
williamr@2
   263
	EKUDesSetLengthOverflow=35,
williamr@2
   264
	
williamr@2
   265
	/**
williamr@2
   266
	This panic is raised by the kernel side code that implements the setting
williamr@2
   267
	of the currency symbol when the length of the currency symbol is 
williamr@2
   268
    greater than KMaxCurrencySymbol. 
williamr@2
   269
	*/
williamr@2
   270
	EBadParameter=36,
williamr@2
   271
	
williamr@2
   272
	/**
williamr@2
   273
	This panic is raised by kernel code when it tries to acquire the process
williamr@2
   274
	DLL lock just before a load, and the wait DLL lock is invalid.
williamr@2
   275
	*/
williamr@2
   276
	EWaitDllLockInvalid=37,
williamr@2
   277
	
williamr@2
   278
	/**
williamr@2
   279
	This panic is raised by internal kernel code when an illegal attempt
williamr@2
   280
	is made to attatch to a library.
williamr@2
   281
	*/
williamr@2
   282
	ELibraryAttachInvalid=38,
williamr@2
   283
	
williamr@2
   284
	/**
williamr@2
   285
	This panic is raised when extracting a list of DLL entry points
williamr@2
   286
	and the number exceeds the maximum permitted.
williamr@2
   287
	*/
williamr@2
   288
	ETooManyEntryPoints=39,
williamr@2
   289
	
williamr@2
   290
	/**
williamr@2
   291
	This panic is raised by internal kernel code when an illegal attempt
williamr@2
   292
	is made to detach a library.
williamr@2
   293
	*/
williamr@2
   294
	ELibraryDetachInvalid=40,
williamr@2
   295
	
williamr@2
   296
	/**
williamr@2
   297
	This panic is raised by internal kernel code when an illegal attempt
williamr@2
   298
	is made to attach to a library.
williamr@2
   299
	*/
williamr@2
   300
	ELibraryAttachedInvalid=41,
williamr@2
   301
williamr@2
   302
	/**
williamr@2
   303
	This panic is raised by internal kernel code when an illegal attempt
williamr@2
   304
	is made to detach a library.
williamr@2
   305
	*/
williamr@2
   306
	ELibraryDetachedInvalid=42,
williamr@2
   307
williamr@2
   308
	/**
williamr@2
   309
	This panic is raised by kernel code when it tries to release the process DLL lock
williamr@2
   310
	when a load fails, and the release DLL lock is invalid.
williamr@2
   311
	*/
williamr@2
   312
	EReleaseDllLockInvalid=43,
williamr@2
   313
	
williamr@2
   314
	/**
williamr@2
   315
	This panic is raised when a bad message handle is passed to the kernel.
williamr@2
   316
	This usually occurs when using methods on the RMessagePtr2 or RMessage2 classes
williamr@2
   317
	after the message has been completed; or when the iHandle data member has become
williamr@2
   318
	corrupted.
williamr@2
   319
	*/
williamr@2
   320
	EBadMessageHandle=44,
williamr@2
   321
	
williamr@2
   322
	/**
williamr@2
   323
	Not used.
williamr@2
   324
	*/
williamr@2
   325
	EInvalidMessageParameter=45,
williamr@2
   326
	
williamr@2
   327
	/**
williamr@2
   328
	This panic can be raised as a result of a call to one of a large
williamr@2
   329
	number of functions. In general, the panic indicates an attempt to perform an
williamr@2
   330
	operation on a thread or process by code running in another process - violating
williamr@2
   331
	the security principle of process isolation. 
williamr@2
   332
		
williamr@2
   333
	There are exceptions to this general rule, for example, where the
williamr@2
   334
	panic is raised because the calling process has insufficient capability. The
williamr@2
   335
	precise reason is stated with the function(s). 
williamr@2
   336
	
williamr@2
   337
	-# The panic is raised on a call to the following function if the
williamr@2
   338
	   process owning the thread performing the call is not the creator of the target
williamr@2
   339
	   process or, if a handle is specified, the handle is not local.
williamr@2
   340
	   - RProcess::SetParameter()
williamr@2
   341
	   .
williamr@2
   342
	-# The panic is raised on a call to the following functions if the
williamr@2
   343
	   process owning the thread performing the call is not the same as the target
williamr@2
   344
	   process.\n
williamr@2
   345
	   - RProcess::Kill()
williamr@2
   346
	   - RProcess::Terminate()
williamr@2
   347
	   - RProcess::Panic()
williamr@2
   348
	   - RProcess::SetJustInTime()
williamr@2
   349
	   - RProcess::Resume()
williamr@2
   350
	   - RThread::Kill()
williamr@2
   351
	   - RThread::Terminate()
williamr@2
   352
	   - RThread::Panic()
williamr@2
   353
	   - RThread::Suspend()
williamr@2
   354
	   - RThread::Resume()
williamr@2
   355
	   - RThread::SetPriority()		 
williamr@2
   356
	   - RThread::RequestComplete()
williamr@2
   357
	   - RThread::RequestSignal()		 
williamr@2
   358
	   .  
williamr@2
   359
	   NOTE: the creator of a new process can kill or panic the new
williamr@2
   360
	   process, change the new process priority and set the new process startup
williamr@2
   361
	   parameters until the process is resumed (which the creator can also do). After
williamr@2
   362
	   the new process has been resumed, then it becomes totally independent of its
williamr@2
   363
	   creator, and any attempt to panic it, kill it etc will raise the KERN-EXEC 46
williamr@2
   364
	   panic.
williamr@2
   365
	-# The panic is raised on call to the following (Symbian partner
williamr@2
   366
	   only) functions if the calling process does not have the PowerMgmt
williamr@2
   367
	   capability (TCapability::ECapabilityPowerMgmt): 
williamr@2
   368
	   - Power::PowerDown()
williamr@2
   369
	   - Power::EnableWakeupEvents()
williamr@2
   370
	   - Power::DisableWakeupEvents()
williamr@2
   371
	   - Power::RequestWakeupEventNotification()
williamr@2
   372
	   - Power::CancelWakeupEventNotification()
williamr@2
   373
	   .
williamr@2
   374
	-# The panic is raised on call to the following functions if the
williamr@2
   375
	   calling process does not have the WriteDeviceData capability
williamr@2
   376
       (TCapability::ECapabilityWriteDeviceData): 
williamr@2
   377
	   - User::SetMachineConfiguration()
williamr@2
   378
	   - User::SetHomeTime()
williamr@2
   379
	   - User::SetUTCTime()
williamr@2
   380
	   - User::SetUTCOffset()
williamr@2
   381
	   - User::SetUTCTimeAndOffset()
williamr@2
   382
	   .
williamr@2
   383
	-# The panic is raised on call to the following function if the
williamr@2
   384
	   calling process does not have the ReadDeviceData capability
williamr@2
   385
	   (TCapability::ECapabilityReadDeviceData): 		  
williamr@2
   386
	   - User::MachineConfiguration()
williamr@2
   387
	   .
williamr@2
   388
	*/
williamr@2
   389
	EPlatformSecurityTrap=46,
williamr@2
   390
	
williamr@2
   391
	/**
williamr@2
   392
	This panic is raised when the user issues a request to be notified of
williamr@2
   393
	messages or the availability of space, when a request has already been
williamr@2
   394
	issued and is still outstanding.
williamr@2
   395
	
williamr@2
   396
	@see RMsgQueue
williamr@2
   397
	*/
williamr@2
   398
	EMsgQueueRequestPending=47,
williamr@2
   399
	
williamr@2
   400
	/**
williamr@2
   401
	This panic is raised when creating a message queue and the size of
williamr@2
   402
	the template parameter is invalid.
williamr@2
   403
	
williamr@2
   404
	@see RMsgQueue
williamr@2
   405
	*/
williamr@2
   406
	EMsgQueueInvalidLength=48,
williamr@2
   407
	
williamr@2
   408
	/**
williamr@2
   409
	This panic is raised when creating a message queue and the specified number
williamr@2
   410
	of slots is not positive.
williamr@2
   411
	
williamr@2
   412
	@see RMsgQueue
williamr@2
   413
	*/
williamr@2
   414
	EMsgQueueInvalidSlots=49,
williamr@2
   415
	
williamr@2
   416
	/**
williamr@2
   417
	This panic is raised if an attempt is made to cancel an outstanding request 
williamr@2
   418
	to be notified of messages or the availability of space, and the cancel is
williamr@2
   419
	being made by a thread in a different process.
williamr@2
   420
	*/
williamr@2
   421
	EMsgQueueIllegalCancel=50,
williamr@2
   422
	
williamr@2
   423
	/**
williamr@2
   424
	This panic is raised by RProcess::Setparameter()
williamr@2
   425
	if a slot value is invalid.
williamr@2
   426
	*/
williamr@2
   427
	EParameterSlotRange=51,
williamr@2
   428
	
williamr@2
   429
	/**
williamr@2
   430
	This panic is raised by RProcess::Setparameter()
williamr@2
   431
	if a slot is in use.
williamr@2
   432
	*/
williamr@2
   433
	EParameterSlotInUse=52,
williamr@2
   434
	
williamr@2
   435
	/**
williamr@2
   436
	This panic is raised by RProcess::Setparameter()
williamr@2
   437
	if the length of the data passed is negative.
williamr@2
   438
	*/
williamr@2
   439
	EParameterSlotDataLength=53,
williamr@2
   440
	
williamr@2
   441
	/**
williamr@2
   442
	This panic is raised by RCondVar::Wait() when the current thread does
williamr@2
   443
	not hold the specified mutex.
williamr@2
   444
	*/
williamr@2
   445
	ECondVarWaitMutexNotLocked=54,
williamr@2
   446
	
williamr@2
   447
	/**
williamr@2
   448
	This panic is raised when a call is made to RThread::GetDesMaxLength(),
williamr@2
   449
	which is obsolete.
williamr@2
   450
	*/
williamr@2
   451
	EObsoleteFunctionality=55,
williamr@2
   452
williamr@2
   453
	/**
williamr@2
   454
	This panic is raised on a process which has not yet been resumed and whoes
williamr@2
   455
	creator has died.
williamr@2
   456
	*/
williamr@2
   457
	EZombieProcessKilled=56,
williamr@2
   458
williamr@2
   459
	/**
williamr@2
   460
	A connect message was sent to a session that has already been successfully
williamr@2
   461
	connected to the server (cookie is non-NULL).
williamr@2
   462
	*/
williamr@2
   463
	ESessionAlreadyConnected=57,
williamr@2
   464
williamr@2
   465
	/**
williamr@2
   466
	A session tried to set the kernel session cookie to a null value
williamr@2
   467
	*/
williamr@2
   468
	ESessionNullCookie=58,
williamr@2
   469
williamr@2
   470
	/**
williamr@2
   471
	A session tried to set the kernel session cookie twice
williamr@2
   472
	*/
williamr@2
   473
	ESessionCookieAlreadySet=59,
williamr@2
   474
williamr@2
   475
	/**
williamr@2
   476
	A session tried to set the kernel session cookie with a message
williamr@2
   477
	that wasn't the connect message
williamr@2
   478
	*/
williamr@2
   479
	ESessionInvalidCookieMsg=60,
williamr@2
   480
williamr@2
   481
	/**
williamr@2
   482
	A realtime thread executed a non-realtime function.
williamr@2
   483
	*/
williamr@2
   484
	EIllegalFunctionForRealtimeThread=61
williamr@2
   485
	};
williamr@2
   486
williamr@2
   487
#endif