1.1 --- a/epoc32/include/e32kpan.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/e32kpan.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,487 @@
1.4 -e32kpan.h
1.5 +// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +// e32\include\e32kpan.h
1.19 +// Kernel-generated panic codes
1.20 +//
1.21 +//
1.22 +
1.23 +#ifndef __E32KPAN_H__
1.24 +#define __E32KPAN_H__
1.25 +#include <e32def.h>
1.26 +
1.27 +/**
1.28 +@publishedAll
1.29 +@released
1.30 +
1.31 +These panics represent program errors detected by the Kernel.
1.32 +Typically, they are caused by passing bad or contradictory parameters
1.33 +to functions. Threads that cause exceptions also raise a KERN-EXEC type panic.
1.34 +*/
1.35 +enum TKernelPanic
1.36 + {
1.37 +
1.38 + /**
1.39 + This panic is raised when the Kernel cannot find an object in
1.40 + the object index for the current process, or current thread, using
1.41 + a specified object index number (the raw handle number).
1.42 + */
1.43 + EBadHandle=0,
1.44 +
1.45 + /**
1.46 + This is a general panic raised as a result of attempting
1.47 + some unauthorised activity such as trying to suspend a thread,
1.48 + or trying to set the priority of a thread, when not authorised to do so.
1.49 + */
1.50 + EAccessDenied=1,
1.51 +
1.52 + /**
1.53 + This panic is raised by the kernel when opening a kernel side object,
1.54 + a DObject type, and the fullname is invalid.
1.55 + */
1.56 + EBadName=2,
1.57 +
1.58 + /**
1.59 + This panic is raised when an unhandled exception occurs.
1.60 + Exceptions have many causes, but the most common are access violations
1.61 + caused, for example, by dreferencing NULL.
1.62 +
1.63 + Among other possible causes are:
1.64 + general protection faults, executing an invalid instruction,
1.65 + alignment checks, etc.
1.66 + */
1.67 + ECausedException=3,
1.68 +
1.69 + /**
1.70 + Not used.
1.71 + */
1.72 + ECompletion=4,
1.73 +
1.74 + /**
1.75 + Not used.
1.76 + */
1.77 + ELeaveWithoutTrap=5,
1.78 +
1.79 + /**
1.80 + This panic is raised by the kernel when a handle to a code segment
1.81 + is invalid.
1.82 + */
1.83 + EBadCodeSegHandle=6,
1.84 +
1.85 + /**
1.86 + Not used.
1.87 + */
1.88 + ESegmentWriteOutOfRange=7,
1.89 +
1.90 + /**
1.91 + Not used.
1.92 + */
1.93 + EChunkSizeTooBig=8,
1.94 +
1.95 + /**
1.96 + This is a general panic raised by the kernel when an attempt
1.97 + is made to issue a request when one is already outstanding, and only one
1.98 + outstanding request is permitted at any one time.
1.99 + */
1.100 + ERequestAlreadyPending=9,
1.101 +
1.102 + /**
1.103 + This panic is raised by the Request() member function of
1.104 + the DLogicalChannel() kernel object when the request number passed
1.105 + to the function is smaller than the permitted minimum.
1.106 +
1.107 + @see DLogicalChannel::EMinRequestId
1.108 + */
1.109 + ERequestNoInvalid=10,
1.110 +
1.111 + /**
1.112 + This panic is raised when creating a logical channel, and the unit number
1.113 + is outside the permitted range.
1.114 +
1.115 + If unit numbers are not permmitted, the unit number value
1.116 + must be KNullUnit.
1.117 + If unit numbers are permitted, the unit number value must
1.118 + be less than KMaxUnits.
1.119 + */
1.120 + EBadUnitNumber=11,
1.121 +
1.122 + /**
1.123 + This panic is raised by the kernel if an event capture
1.124 + hook has already been designated.
1.125 + */
1.126 + EEventAlreadyCaptured=12,
1.127 +
1.128 + /**
1.129 + This panic is raised by the kernel if the current thread is not
1.130 + the designated event capture hook.
1.131 + */
1.132 + EEventNotCaptured=13,
1.133 +
1.134 + /**
1.135 + This panic is raised when an attempt is made to set the priority of
1.136 + a thread or process to an illegal value.
1.137 + */
1.138 + EBadPriority=14,
1.139 +
1.140 + /**
1.141 + This panic is raised when a timer event is requested from an asynchronous
1.142 + timer service, an RTimer, and a timer event is already outstanding.
1.143 + It is caused by calling either the At(), After() or Lock() member functions
1.144 + after a previous call to any of these functions but before the timer event
1.145 + requested by those functions has completed.
1.146 + */
1.147 + ETimerAlreadyPending=15,
1.148 +
1.149 + /**
1.150 + Not used.
1.151 + */
1.152 + EAlreadyLoggedOn=16,
1.153 +
1.154 + /**
1.155 + The panic is raised if kernel heap checking has failed.
1.156 + */
1.157 + EFailedKernelHeapCheck=17,
1.158 +
1.159 + /**
1.160 + Not used.
1.161 + */
1.162 + ERequestFromWrongThread=18,
1.163 +
1.164 + /**
1.165 + This panic is raised by the Kernel when a server program issues a request
1.166 + to receive a message, i.e. when it calls the Receive() member function
1.167 + of RServer, the handle to the Kernel side server object.
1.168 +
1.169 + The panic occurs when a receive message request has previously been made
1.170 + and is still outstanding.
1.171 + */
1.172 + EMesAlreadyPending=19,
1.173 +
1.174 + /**
1.175 + This panic is raised by the Kernel when a request for an event
1.176 + (as originated by a call to UserSvr::RequestEvent()) is made while
1.177 + a previously made request is still outstanding.
1.178 + */
1.179 + EEventRequestPending=20,
1.180 +
1.181 + /**
1.182 + Not used.
1.183 + */
1.184 + EIllegalWsProcess=21,
1.185 +
1.186 + /**
1.187 + Not used.
1.188 + */
1.189 + EHardwareNotAvailable=22,
1.190 +
1.191 + /**
1.192 + This panic is raised when attempting to create a session with a server,
1.193 + and access is been denied.
1.194 + */
1.195 + EUnsharableSession=23,
1.196 +
1.197 + /**
1.198 + This panic is raised when writing global DLL data, and the length of
1.199 + data to be written is greater than the space available.
1.200 + */
1.201 + EDesOverflow=24,
1.202 +
1.203 + /**
1.204 + This panic is raised when searching for objects, using the internal
1.205 + function TFindHandleBase::NextObject(), and an invalid object type
1.206 + is specified.
1.207 + */
1.208 + EBadObjectType=25,
1.209 +
1.210 + /**
1.211 + This panic is raised by kernel side code that implements heap debugging
1.212 + behaviour, when a specific debug request is not recognised.
1.213 + */
1.214 + EBadKernelHeapDebugFunction=26,
1.215 +
1.216 + /**
1.217 + This panic is raised when an executive call is made with an invalid call
1.218 + number.
1.219 + */
1.220 + EInvalidSystemCall=27,
1.221 +
1.222 + /**
1.223 + Not used.
1.224 + */
1.225 + ESetSessionPtrInvalidMessage=28,
1.226 +
1.227 + /**
1.228 + Not used.
1.229 + */
1.230 + ECompleteDisconnectInvalidMessage=29,
1.231 +
1.232 + /**
1.233 + This panic is raised when an attempt is being made to send
1.234 + a synchronous message to a server more than once, using
1.235 + the current thread's dedicated synchronous message.
1.236 + */
1.237 + ESyncMsgSentTwice=30,
1.238 +
1.239 + /**
1.240 + Not used.
1.241 + */
1.242 + EAutoAttachFailed=31,
1.243 +
1.244 + /**
1.245 + This panic is called by DProcess::Resume() when trying to resume
1.246 + a process that is still being loaded.
1.247 + */
1.248 + EProcessNotLoaded=32,
1.249 +
1.250 + /**
1.251 + This panic is raised in a call to Kern::KUDesInfo(), Kern::KUDesPut() etc
1.252 + when an invalid descriptor is passed.
1.253 + */
1.254 + EKUDesInfoInvalidType=33,
1.255 +
1.256 + /**
1.257 + This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut()
1.258 + when the descriptor passed to it is not a modifiable type.
1.259 + */
1.260 + EKUDesSetLengthInvalidType=34,
1.261 +
1.262 + /**
1.263 + This panic is raised in a call to Kern::KUDesSetLength() & Kern::KUDesPut()
1.264 + when the length of the source descriptor is longer than the length of
1.265 + the target descriptor.
1.266 + */
1.267 + EKUDesSetLengthOverflow=35,
1.268 +
1.269 + /**
1.270 + This panic is raised by the kernel side code that implements the setting
1.271 + of the currency symbol when the length of the currency symbol is
1.272 + greater than KMaxCurrencySymbol.
1.273 + */
1.274 + EBadParameter=36,
1.275 +
1.276 + /**
1.277 + This panic is raised by kernel code when it tries to acquire the process
1.278 + DLL lock just before a load, and the wait DLL lock is invalid.
1.279 + */
1.280 + EWaitDllLockInvalid=37,
1.281 +
1.282 + /**
1.283 + This panic is raised by internal kernel code when an illegal attempt
1.284 + is made to attatch to a library.
1.285 + */
1.286 + ELibraryAttachInvalid=38,
1.287 +
1.288 + /**
1.289 + This panic is raised when extracting a list of DLL entry points
1.290 + and the number exceeds the maximum permitted.
1.291 + */
1.292 + ETooManyEntryPoints=39,
1.293 +
1.294 + /**
1.295 + This panic is raised by internal kernel code when an illegal attempt
1.296 + is made to detach a library.
1.297 + */
1.298 + ELibraryDetachInvalid=40,
1.299 +
1.300 + /**
1.301 + This panic is raised by internal kernel code when an illegal attempt
1.302 + is made to attach to a library.
1.303 + */
1.304 + ELibraryAttachedInvalid=41,
1.305 +
1.306 + /**
1.307 + This panic is raised by internal kernel code when an illegal attempt
1.308 + is made to detach a library.
1.309 + */
1.310 + ELibraryDetachedInvalid=42,
1.311 +
1.312 + /**
1.313 + This panic is raised by kernel code when it tries to release the process DLL lock
1.314 + when a load fails, and the release DLL lock is invalid.
1.315 + */
1.316 + EReleaseDllLockInvalid=43,
1.317 +
1.318 + /**
1.319 + This panic is raised when a bad message handle is passed to the kernel.
1.320 + This usually occurs when using methods on the RMessagePtr2 or RMessage2 classes
1.321 + after the message has been completed; or when the iHandle data member has become
1.322 + corrupted.
1.323 + */
1.324 + EBadMessageHandle=44,
1.325 +
1.326 + /**
1.327 + Not used.
1.328 + */
1.329 + EInvalidMessageParameter=45,
1.330 +
1.331 + /**
1.332 + This panic can be raised as a result of a call to one of a large
1.333 + number of functions. In general, the panic indicates an attempt to perform an
1.334 + operation on a thread or process by code running in another process - violating
1.335 + the security principle of process isolation.
1.336 +
1.337 + There are exceptions to this general rule, for example, where the
1.338 + panic is raised because the calling process has insufficient capability. The
1.339 + precise reason is stated with the function(s).
1.340 +
1.341 + -# The panic is raised on a call to the following function if the
1.342 + process owning the thread performing the call is not the creator of the target
1.343 + process or, if a handle is specified, the handle is not local.
1.344 + - RProcess::SetParameter()
1.345 + .
1.346 + -# The panic is raised on a call to the following functions if the
1.347 + process owning the thread performing the call is not the same as the target
1.348 + process.\n
1.349 + - RProcess::Kill()
1.350 + - RProcess::Terminate()
1.351 + - RProcess::Panic()
1.352 + - RProcess::SetJustInTime()
1.353 + - RProcess::Resume()
1.354 + - RThread::Kill()
1.355 + - RThread::Terminate()
1.356 + - RThread::Panic()
1.357 + - RThread::Suspend()
1.358 + - RThread::Resume()
1.359 + - RThread::SetPriority()
1.360 + - RThread::RequestComplete()
1.361 + - RThread::RequestSignal()
1.362 + .
1.363 + NOTE: the creator of a new process can kill or panic the new
1.364 + process, change the new process priority and set the new process startup
1.365 + parameters until the process is resumed (which the creator can also do). After
1.366 + the new process has been resumed, then it becomes totally independent of its
1.367 + creator, and any attempt to panic it, kill it etc will raise the KERN-EXEC 46
1.368 + panic.
1.369 + -# The panic is raised on call to the following (Symbian partner
1.370 + only) functions if the calling process does not have the PowerMgmt
1.371 + capability (TCapability::ECapabilityPowerMgmt):
1.372 + - Power::PowerDown()
1.373 + - Power::EnableWakeupEvents()
1.374 + - Power::DisableWakeupEvents()
1.375 + - Power::RequestWakeupEventNotification()
1.376 + - Power::CancelWakeupEventNotification()
1.377 + .
1.378 + -# The panic is raised on call to the following functions if the
1.379 + calling process does not have the WriteDeviceData capability
1.380 + (TCapability::ECapabilityWriteDeviceData):
1.381 + - User::SetMachineConfiguration()
1.382 + - User::SetHomeTime()
1.383 + - User::SetUTCTime()
1.384 + - User::SetUTCOffset()
1.385 + - User::SetUTCTimeAndOffset()
1.386 + .
1.387 + -# The panic is raised on call to the following function if the
1.388 + calling process does not have the ReadDeviceData capability
1.389 + (TCapability::ECapabilityReadDeviceData):
1.390 + - User::MachineConfiguration()
1.391 + .
1.392 + */
1.393 + EPlatformSecurityTrap=46,
1.394 +
1.395 + /**
1.396 + This panic is raised when the user issues a request to be notified of
1.397 + messages or the availability of space, when a request has already been
1.398 + issued and is still outstanding.
1.399 +
1.400 + @see RMsgQueue
1.401 + */
1.402 + EMsgQueueRequestPending=47,
1.403 +
1.404 + /**
1.405 + This panic is raised when creating a message queue and the size of
1.406 + the template parameter is invalid.
1.407 +
1.408 + @see RMsgQueue
1.409 + */
1.410 + EMsgQueueInvalidLength=48,
1.411 +
1.412 + /**
1.413 + This panic is raised when creating a message queue and the specified number
1.414 + of slots is not positive.
1.415 +
1.416 + @see RMsgQueue
1.417 + */
1.418 + EMsgQueueInvalidSlots=49,
1.419 +
1.420 + /**
1.421 + This panic is raised if an attempt is made to cancel an outstanding request
1.422 + to be notified of messages or the availability of space, and the cancel is
1.423 + being made by a thread in a different process.
1.424 + */
1.425 + EMsgQueueIllegalCancel=50,
1.426 +
1.427 + /**
1.428 + This panic is raised by RProcess::Setparameter()
1.429 + if a slot value is invalid.
1.430 + */
1.431 + EParameterSlotRange=51,
1.432 +
1.433 + /**
1.434 + This panic is raised by RProcess::Setparameter()
1.435 + if a slot is in use.
1.436 + */
1.437 + EParameterSlotInUse=52,
1.438 +
1.439 + /**
1.440 + This panic is raised by RProcess::Setparameter()
1.441 + if the length of the data passed is negative.
1.442 + */
1.443 + EParameterSlotDataLength=53,
1.444 +
1.445 + /**
1.446 + This panic is raised by RCondVar::Wait() when the current thread does
1.447 + not hold the specified mutex.
1.448 + */
1.449 + ECondVarWaitMutexNotLocked=54,
1.450 +
1.451 + /**
1.452 + This panic is raised when a call is made to RThread::GetDesMaxLength(),
1.453 + which is obsolete.
1.454 + */
1.455 + EObsoleteFunctionality=55,
1.456 +
1.457 + /**
1.458 + This panic is raised on a process which has not yet been resumed and whoes
1.459 + creator has died.
1.460 + */
1.461 + EZombieProcessKilled=56,
1.462 +
1.463 + /**
1.464 + A connect message was sent to a session that has already been successfully
1.465 + connected to the server (cookie is non-NULL).
1.466 + */
1.467 + ESessionAlreadyConnected=57,
1.468 +
1.469 + /**
1.470 + A session tried to set the kernel session cookie to a null value
1.471 + */
1.472 + ESessionNullCookie=58,
1.473 +
1.474 + /**
1.475 + A session tried to set the kernel session cookie twice
1.476 + */
1.477 + ESessionCookieAlreadySet=59,
1.478 +
1.479 + /**
1.480 + A session tried to set the kernel session cookie with a message
1.481 + that wasn't the connect message
1.482 + */
1.483 + ESessionInvalidCookieMsg=60,
1.484 +
1.485 + /**
1.486 + A realtime thread executed a non-realtime function.
1.487 + */
1.488 + EIllegalFunctionForRealtimeThread=61
1.489 + };
1.490 +
1.491 +#endif