系统出错信息设计

系统出错信息设计

详细设计说明书

 

 

 

文件状态:

[√] 草稿

[ ] 正式发布

[ ] 正在修改

文件标识:

DWR-WRALM-DS-DTDS

当前版本:

0.928

作者:

郑力

完成日期:

2004-09-28

 

 

版本/状态

作者

参与者

起止日期

备注

草稿

郑力

 

0.9.918

 

草稿

郑力

2004-09-21

2004-09-21

 

草稿

郑力

2004-09-28

2004-09-28

 

 

 


1       文档介绍

1.1    文档目的

试图阐述系统出错在一个系统中所起重要作用,使系统更加健壮.系统出错如何设计并运用到系统中.以及异常出错信息的维护等情况.

1.2    读者对象

提示:指出预期的读者。详细设计的读者一般包括项目主管、开发人员、测试人员以及维护人员等。

1.3    参考文档

提示:列出本文档的所有参考文献(可以是非正式出版物),如:

a.本项目的经核准的计划任务书或合同、上级机关的批文;

b.属于本项目的其他已发表的文件;

c.本文件中各处引用的文件、资料、包括所要用到的软件开发标准。

列出这些文件资料的标题、文件编号、发表日期和出版单位,说明能够得到这些文件资料的来源。作者,文献名称,出版单位(或归属单位),日期等。

格式例如:

[1]  许新宜、王浩、甘泓等,华北地区宏观经济水资源规划理论与方法,黄河水利出版社,1997.10

1.4    术语与缩写解释

缩写、术语

DWR

水资源所

WRALM

水资源配置模型

DN

设计 design

DTDS

详细设计 detail design

 

 

 

 

 

 

 

 

 

 

 

2          体系结构设计

2.1    体系总体结构设计

2.1.1   体系总体设计结构图

       其描述为:

       在上图的上部是软件工程系统中所面临的解决问题的部分.其中会有错误异常的发生.

根据编写定制的需要,需要错误异常处理机制进行处理,根据规则需要,错误异常可能会直接返回给相应的发生问题的部分,也可能需要交给应用客户端或使用者进行干预从而确定是否返回给发生问题的部分.

2.1.2   什么是错误异常

简单地说,错误异常代表了应用程序的某种状态(错误或异常状态),也就是所谓异常状况。通常,这种应用程序中出现的异常会产生某些类型的错误,而且异常自身也会采用某些方式来描述错误的状况。当程序中发生异常时,它会沿着函数调用链传递直到发生以下两种情况:发现了能够处理异常的处理器或者异常被扔出应用程序的主要方法,在这种情况之下就会触发缺省的异常处理器。通常也就意味着结束程序的运行。

       能够探察错误的一方不知道如何处理错误,知道如何处理错误的一方没有能力探察错误,而直接采用防御性代码来解决,会使得程序的正常结构被打乱,从而带来更多的错误。这种困境是非常难以应对的——费心耗力而未必有回报。因此,更多的人采用鸵鸟战术,对可能发生的错误视而不见,任其自然。

2.1.3   错误异常在系统中的作用

       错误异常是一个系统的重要组成部分.在调试,测试以及运行时都有重要作用.

       在调试阶段,能够清楚的告诉软件开发人员,在代码的哪行出了错误,是什么方法或哪个方法调用了哪个方法,存在于哪个文件等情况.总之,使软件开发人员很清楚的明白哪个地方错了,以及形成错误的原因是什么等情况的说明.这样便于软件开发人员努力修订自己的程序,尽量避免类似情况发生.

       在测试阶段便于测试人员写出测试文档,在测试文档中,相关人员便于理解并修订原程序.需要提供必要的软件开发人员名称,软件版本号,以及写作时间和运行时间.

       在运行阶段,需要提供给用户尽可能的友好信息,便于理解和交互.

2.1.4   错误异常处理机制和原则

Try代码块保护的代码所发生的任何异常,甚至包括在不含Try代码块的被调函数或

方法以内的异常都将被Catch代码块内的代码处理。当然,除非catch代码块自己也扔出了

异常,而在这种情况下异常会被扔到下一个级别更高的try代码块,哪怕那意味着从当前正

在执行的函数中扔出异常。

异常的4条重要规则

  • 如果catch块有若干个,那么异常将根据其类型被扔给最适当的一个catch接受处理。
  • 如果没有找到可接受的catch块,则异常被从当前的try块扔到从调用顺序链中找到的下一个可用的catch块。
  • 异常对象的类型给出了发生错误本质的重要信息。
  • 异常可以通过throw关键词显式扔出。

代码就可以选择性地只处理那些有能力处理的错误,同时相信其他问题都会统统交给调用堆栈,哪怕至少作为通知处理。在实际应用中,因为让CLR观察扔出的异常对性能有一定的影响,所以使用单个try块同时对应多个特殊异常的catch语句是检查代码多个特定错误的最佳方式。

2.2    错误异常情况

       根据系统应用,常见错误异常分为数据存储部分,应用部分,核心库部分,商业层部分.

       数据存储部分:主要系统在与数据库产品交互时,常见的一些错误.比如数据库连接错误,数据库对象不存在或数据字符过多.

       应用部分:主要是反映用户在键盘输入操作时,可能引起的数据类型错误,字符长度超过限制等,使用鼠标或键盘可能引起的操作错误等.

       核心库部分:主要反映系统框架中的一些错误.比如数组下标越界,数字超出范围等.

       商业层部分:主要反映系统中的一些如权限被拒绝,输入参数错误等.

2.2.1   数据存储部分:

       该部分我们在异常中主要使用三个类:SqlException,OracleException以及OleDbExcetion.

建议最后不要用OdbcException.其错误代码范围为:100000---200000.

2.2.1.1             SqlServer:

       ErrorCode范围: 100000--- 200000 --SqlException

2.2.1.2             Oracle:

       ErrorCode范围: 100000----200000-- OracleException

2.2.1.3             Access:

       L暂缺)

       ErrorCode范围: 100000----200000-- OleDbException

2.2.1.4             DB:

       L暂缺)

ErrorCode范围: 100000----200000-- OleDbException

2.2.1.5             Sybase:

       L暂缺)

       ErrorCode范围: 100000----200000-- OleDbException

2.2.1.6             MySql:

       L暂缺)

       ErrorCode范围: 100000----200000-- OleDbException

2.2.1.7             其它:

L暂缺)

ErrorCode范围: 100000----200000—OleDbException

2.2.2   应用部分

       此部分根据不同的商业应用或目的不同,就有很多的差别.

       所以仅给出错误代码范围1---100000.具体提示信息由软件开发人员,软件设计人员及系统相关人员进行商议.并在软件发行时使用AppError.resources文件

       ApplicationException;

2.2.3   核心库部分

       该部分包括系统核心模型.根据其应用不同,其消息也有所不同.

       其错误代码范围为10000---50000

       Framework系统平台错误代码(10000---10500),此处是指平台库提供的内部错误.Exception参见.NET异常处理类.

       AppError.resources

2.2.4   商业层部分

       该部分包括绝大多数的商业应用,其错误代码范围为50000---100000

       AppError.resources

2.3    错误异常信息存取维护设计

2.3.1   运行时数据格式:

数据格式说明:

字段

数据类型

中文描述

说明

备注

ErrCode

System.Int32

错误代码

 

 

ErrMsg

System.String

错误描述信息

 

 

CreateTime

System.DateTime

发生时间

 

 

 

2.3.2   测试时(系统模块)数据格式:

数据格式说明:

字段

数据类型

中文描述

说明

备注

ErrProgrammer

System.String

开发人员

 

 

ErrAssmbly

System.String

装配件名称

 

 

ErrCode

System.Int32

错误代码

 

 

ErrMsg

System.String

错误描述信息

 

 

CreateTime

System.DateTime

发生时间

 

 

 

2.3.3   调试时数据格式:

数据格式说明:

字段

数据类型

中文描述

说明

备注

ErrSource

System.String

源代码文件

 

 

ErrMethod

System.String

发错错误的方法名称

 

 

ErrLine

System.Int32

发生错误所在的行数

 

 

ErrProgrammer

System.String

开发人员

 

 

ErrAssmbly

System.String

装配件名称

 

 

ErrCode

System.Int32

错误代码

 

 

ErrMsg

System.String

错误描述信息

 

 

CreateTime

System.DateTime

发生时间

 

 

 

2.3.4   数据维护:

相关人员编辑编辑AppError.xml.即可.

该文件也是个累积过程,如数据库方面的错误信息,在个类型数据库中,根据数据库操作

本身返回的错误代码,不同厂商也有不同的编码,所以,我们需要积累这方面的知识,使它达到

正确的预报错误信息的目的.

2.4    错误异常设计

       根据错误异常在系统中的作用 错误异常情况,进行如下设计:

       程序的三个阶段.调试,测试,发布.所以该类中需要使用到预编译指令来解决这个问题.

同时也就根据三个阶段,显示不同的信息给用户.

       定义于编译指令:

       #define DEBUG

#define TEST

#define RUN

实现上述所描述的结果.

       UML关系图:

      

       根据用户传入的ErrorCode,AppError.resources中查找相应的MsgInfo并返回.

2.5     错误异常实现()

2.5.1   interface Ibase

属性:

属性名称

数据类型

可见性

说明

缺省值

Name

System.String

 

名称

 

ID

Int32

 

编号

 

 

public interface IBase

    {

    }

2.5.2   class QingLiuName

此类需要实现接口Ibase.

字段

字段名称

数据类型

可见性

说明

缺省值

Name

System.String

private

名称

 

Id

Int32

private

编号

-1

 

public abstract class QingLiuName:IBase

    {     

    }

 

2.5.3   class SoftwareEngineer

此类从QingLiuName中继承过来

属性

属性名称

数据类型

可见性

说明

缺省值

ModuleName

System.String

 

名称

 

 

字段

属性名称

数据类型

可见性

说明

缺省值

moduleName

System.String

private

模块名称

 

 

public class SoftwareEngineer:QingLiuName

    {     

    }

2.5.4   interface IException

属性:

属性名称

数据类型

可见性

说明

缺省值

Exception

System.Exception

Get

异常类

 

SoftwareEngineer

SoftwareEngineer

Get

开发人员类

 

 

public interface IException

    {  

    }

2.5.5   delegate ExceptionEventHandle

异常委托,用于实现定制的错误异常消息反馈.

public delegate void ExceptionEventHandle(object sender,System.EventArgs e);

2.5.6   interface Iserializable

系统平台提供.

public interface System.Runtime.Serialization.ISerializable
{
 }

2.5.7   class Exception

系统平台提供.

public class Exception :
    object,
    System.Runtime.Serialization.ISerializable
{
}

2.5.8   class BaseException

属性:

属性名称

数据类型

可见性

说明

缺省值

Exception

Exception

 

异常类

 

SoftwareEngineer

SoftwareEngineer

 

开发人员类

 

MsgID

Int32

Get

异常代码

 

OnExceptionHandle

ExceptionEventHandle

 

回调函数

 

 

字段

字段名称

数据类型

可见性

说明

缺省值

_exception

Exception

internal

异常类

 

_softwareEngineer

SoftwareEngineer

internal

开发人员类

 

makeTime

DateTime

internal

发生时间

 

MsgID

Int32

internal

异常代码

 

ErrMsg

String

Internal

异常信息

 

onExceptionHandle

ExceptionEventHandle

internal

回调函数

 

 

方法:

可见性

方法名称

返回类型

输入参数

输入参数类型

功能

public static

OnShowExceptionMessage

DialogResult

sender

object

根据传入的sender,解析错误异常类.并返回给调用者.

 

 

 

e

EventArgs

virtual internal

OnExceptionCall

Void

 

 

根据三个不同阶段进行相应处理.并返回何时的消息

Pubic static virutal

GetMsg

String

errorCode

Int

根据错误编码返回相应的信息

Public virutal

GetMsg

String

 

 

根据错误编码返回相应的信息

Public

Virtual

GetResourceFile

String

languageType

CultureInfo

根据资源化获取错误文件的名称,从而确定了返回消息的编码.主要使用在软件的发布阶段和软件的定位上是否可用.

Public

virtual

GetResponse

String

msg

DialogResult

该方法调用消息窗体,显示错误异常消息,并等待用户交互结果.

 

2.5.9   class QLException

该类从BaseException继承而来,并实现接口IException.

public class QLException:System.Exception,IException,System.Runtime.Serialization.ISerializable

    {                

    }

2.5.10 interface IDBException

该接口继承了接口IException.

属性:

属性名称

数据类型

可见性

说明

缺省值

SqlException

SqlException

 

 

 

OracleException

OracleException

 

 

 

OleDbExcetion

OleDbExcetion

 

 

 

 

public interface IDBException:IException

    {     

    }

2.5.11 class QLDBException

该类从BaseException继承而来.并实现接口IDBException.

字段

字段名称

数据类型

可见性

说明

缺省值

_sqlException

SqlException

private

 

 

_oracleException

OracleException

private

 

 

_oleDbExcetion

OleDbExcetion

private

 

 

 

该类从QLException继承而来,并实现IDBException接口,Iserializable接口.

public class QLDBException:QLException,IDBException,System.Runtime.Serialization.ISerializable

    {

    }

2.5.12 可扩展接口

2.5.12.1       发送邮件

interface ISendMail{
}

2.5.12.2       写入数据库

interface IWriteData{
}

2.5.12.3       写入文件

interface IWriteFile{
}

2.5.12.4       写入系统日志

interface IWriteSystemLog{
}

 

3          .net工程设计

3.1    工程名:

ExceptionError. Csproj

3.1.1   文件名称

BaseException.cs

QingLiuException.cs

QingLiuName.cs

QingLiuObject.cs

QLDBException.cs

SoftwareEngineer.cs

IBase.cs

IDBException.cs

IException.cs

QLDelegate.cs

4          界面的设计

4.1    界面

4.2    界面资源

4.2.1   图标

4.2.1.1             窗体图标一个
4.2.1.2             异常类别图标个数用级别总数确定
4.2.1.3             按钮图标4.

4.2.2   界面表现组件

4.2.2.1             图片控件一个
4.2.2.2             标签一个
4.2.2.3             按钮若干

4.3    美学设计(美工进行指导)

 

5          模块设计

 

5.1    错误异常实现()

5.1.1   interface IBase

public interface IBase

    {

    }

5.1.2   class QingLiuName

public abstract class QingLiuName:IBase

    {     

    }

5.1.3   class SoftwareEngineer

public class SoftwareEngineer:QingLiuName

    {     

    }

5.1.4   interface IException

public interface IException

    {  

    }

5.1.5   delegate ExceptionEventHandle

public delegate void ExceptionEventHandle(object sender,System.EventArgs e);

5.1.6            interface ISerializable

public interface System.Runtime.Serialization.ISerializable
{
 }

5.1.7   class Exception

public class Exception :
    object,
    System.Runtime.Serialization.ISerializable
{
}

5.1.8   class QLException

public class QLException:System.Exception,IException,System.Runtime.Serialization.ISerializable

    {                

    }

5.1.9   interface IDBException

public interface IDBException:IException

    {     

    }

5.1.10 class QLDBException

public class QLDBException:QLException,IDBException,System.Runtime.Serialization.ISerializable

    {

    }

 

6          运行实例

6.1    用例代码:

new QLException(e1,100);

 

6.2    用例 1

 

6.3    异常维护

编辑AppError.xml.包括相应的多语言版本的文件

7          其它设计

 

8          附属文件清单及文件

8.1    .NET异常处理类:

8.1.1.1    class System.Reflection.Emit.__ExceptionInfo
8.1.1.2 struct System.Reflection.Emit.__ExceptionInstance
8.1.1.3             sealed class System.Data.SqlClient._ValueException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.4             public sealed class System.Reflection.AmbiguousMatchException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.5             public class AppDomainUnloadedException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.6             public class ApplicationException :
    Exception,
    System.Runtime.Serialization.Iserializable
8.1.1.7             public class ArgumentException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.8             public class ArgumentNullException :
    ArgumentException,
    System.Runtime.Serialization.Iserializable
8.1.1.9             public class ArgumentOutOfRangeException :
    ArgumentException,
    System.Runtime.Serialization.Iserializable
8.1.1.10       public class ArithmeticException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.11       public class ArrayTypeMismatchException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.12       public class BadImageFormatException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.13       class System.Web.HttpApplication+CancelModuleException :
    object
8.1.1.14       public class CannotUnloadAppDomainException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.15       public class System.ComponentModel.Design.CheckoutException :
    System.Runtime.InteropServices.ExternalException,
    System.Runtime.Serialization.Iserializable
8.1.1.16       public class System.ComponentModel.Design.Serialization.CodeDomSerializerException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.17       public class System.CodeDom.CodeThrowExceptionStatement :
    System.CodeDom.CodeStatement
8.1.1.18       public class System.Runtime.InteropServices.COMException :
    System.Runtime.InteropServices.ExternalException,
    System.Runtime.Serialization.Iserializable
8.1.1.19       public class System.Configuration.ConfigurationException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.20       public class System.Data.ConstraintException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.21       public class ContextMarshalException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.22       public class System.Net.CookieException :
    FormatException,
    System.Runtime.Serialization.Iserializable
8.1.1.23       public class System.Security.Cryptography.CryptographicException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.24       public class System.Security.Cryptography.CryptographicUnexpectedOperationException :
    System.Security.Cryptography.CryptographicException,
    System.Runtime.Serialization.Iserializable
8.1.1.25       public class System.Reflection.CustomAttributeFormatException :
    FormatException,
    System.Runtime.Serialization.Iserializable
8.1.1.26       public class System.Data.DataException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.27       public sealed class System.Data.DBConcurrencyException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.28       public class System.Data.DeletedRowInaccessibleException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.29       public class System.IO.DirectoryNotFoundException :
    System.IO.IOException,
    System.Runtime.Serialization.Iserializable
8.1.1.30       public sealed class System.Web.Services.Discovery.DiscoveryExceptionDictionary :
    System.Collections.DictionaryBase,
    System.Collections.IDictionary,
    System.Collections.ICollection,
    System.Collections.Ienumerable
8.1.1.31       public class DivideByZeroException :
    ArithmeticException,
    System.Runtime.Serialization.Iserializable
8.1.1.32       public class DllNotFoundException :
    TypeLoadException,
    System.Runtime.Serialization.Iserializable
8.1.1.33       public class System.Data.DuplicateNameException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.34       public class DuplicateWaitObjectException :
    ArgumentException,
    System.Runtime.Serialization.Iserializable
8.1.1.35       public class System.IO.EndOfStreamException :
    System.IO.IOException,
    System.Runtime.Serialization.Iserializable
8.1.1.36       public class EntryPointNotFoundException :
    TypeLoadException,
    System.Runtime.Serialization.Iserializable
8.1.1.37       class System.Data.OleDb.OleDbException+ErrorCodeConverter :
    System.ComponentModel.Int32Converter
8.1.1.38       public class System.Data.EvaluateException :
    System.Data.InvalidExpressionException,
    System.Runtime.Serialization.Iserializable
8.1.1.39       public class Exception :
    object,
    System.Runtime.Serialization.Iserializable
8.1.1.40       class System.Data.ExceptionBuilder :
    object
8.1.1.41       class System.Windows.Forms.PropertyGridInternal.PropertyDescriptorGridEntry+ExceptionConverter :
    System.ComponentModel.TypeConverter
8.1.1.42       class System.Windows.Forms.PropertyGridInternal.PropertyDescriptorGridEntry+ExceptionEditor :
    System.Drawing.Design.UITypeEditor
8.1.1.43       class System.Net.ExceptionHelper :
    object
8.1.1.44       public sealed class ExecutionEngineException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.45       class System.Data.ExprException :
    System.Data.ExceptionBuilder
8.1.1.46       public class System.Runtime.InteropServices.ExternalException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.47       public class FieldAccessException :
    MemberAccessException,
    System.Runtime.Serialization.Iserializable
8.1.1.48       public class System.IO.FileLoadException :
    System.IO.IOException,
    System.Runtime.Serialization.Iserializable
8.1.1.49       public class System.IO.FileNotFoundException :
    System.IO.IOException,
    System.Runtime.Serialization.Iserializable
8.1.1.50       public class FormatException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.51       public sealed class System.Web.HttpCompileException :
    System.Web.HttpException,
    System.Runtime.Serialization.Iserializable
8.1.1.52       public class System.Web.HttpException :
    System.Runtime.InteropServices.ExternalException,
    System.Runtime.Serialization.Iserializable
8.1.1.53       public sealed class System.Web.HttpParseException :
    System.Web.HttpException,
    System.Runtime.Serialization.Iserializable
8.1.1.54       public sealed class System.Web.HttpRequestValidationException :
    System.Web.HttpException,
    System.Runtime.Serialization.Iserializable
8.1.1.55       public sealed class System.Web.HttpUnhandledException :
    System.Web.HttpException,
    System.Runtime.Serialization.Iserializable
8.1.1.56       public sealed class IndexOutOfRangeException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.57       public class System.Data.InRowChangingEventException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.58       public class System.IO.InternalBufferOverflowException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.59       public class System.Windows.Forms.AxHost+InvalidActiveXStateException :
    Exception,
    System.Runtime.Serialization.Iserializable
8.1.1.60       public class InvalidCastException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.61       public class System.Runtime.InteropServices.InvalidComObjectException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.62       public class System.Data.InvalidConstraintException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.63       class System.Web.Services.Discovery.InvalidContentTypeException :
    Exception,
    System.Runtime.Serialization.Iserializable
8.1.1.64       class System.Web.Services.Discovery.InvalidDocumentContentsException :
    Exception,
    System.Runtime.Serialization.Iserializable
8.1.1.65       public class System.ComponentModel.InvalidEnumArgumentException :
    ArgumentException,
    System.Runtime.Serialization.Iserializable
8.1.1.66       public class System.Data.InvalidExpressionException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.67       public class System.Reflection.InvalidFilterCriteriaException :
    ApplicationException,
    System.Runtime.Serialization.Iserializable
8.1.1.68       public class System.Runtime.InteropServices.InvalidOleVariantTypeException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.69       public class InvalidOperationException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.70       public class System.Drawing.Printing.InvalidPrinterException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.71       public sealed class InvalidProgramException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.72       public class System.IO.IOException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.73       public class System.IO.IsolatedStorage.IsolatedStorageException :
    Exception,
    System.Runtime.Serialization.Iserializable
8.1.1.74       public class System.ComponentModel.LicenseException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.75       public class System.Management.ManagementException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.76       public class System.Runtime.InteropServices.MarshalDirectiveException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.77       public class MemberAccessException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.78       public class System.Messaging.MessageQueueException :
    System.Runtime.InteropServices.ExternalException,
    System.Runtime.Serialization.Iserializable
8.1.1.79       public class MethodAccessException :
    MemberAccessException,
    System.Runtime.Serialization.Iserializable
8.1.1.80       public class MissingFieldException :
    MissingMemberException,
    System.Runtime.Serialization.Iserializable
8.1.1.81       public class System.Resources.MissingManifestResourceException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.82       public class MissingMemberException :
    MemberAccessException,
    System.Runtime.Serialization.Iserializable
8.1.1.83       public class MissingMethodException :
    MissingMemberException,
    System.Runtime.Serialization.Iserializable
8.1.1.84      
public class System.Data.MissingPrimaryKeyException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.85       public sealed class MulticastNotSupportedException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.86       public class System.Data.NoNullAllowedException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.87       public class NotFiniteNumberException :
    ArithmeticException,
    System.Runtime.Serialization.Iserializable
8.1.1.88       public class NotImplementedException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.89       public class NotSupportedException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.90       public class NullReferenceException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.91       public class ObjectDisposedException :
    InvalidOperationException,
    System.Runtime.Serialization.Iserializable
8.1.1.92       public sealed class System.Data.Odbc.OdbcException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.93       public sealed class System.Data.OleDb.OleDbException :
    System.Runtime.InteropServices.ExternalException,
    System.Runtime.Serialization.Iserializable
8.1.1.94       public class OutOfMemoryException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.95       public class OverflowException :
    ArithmeticException,
    System.Runtime.Serialization.Iserializable
8.1.1.96       public class System.IO.PathTooLongException :
    System.IO.IOException,
    System.Runtime.Serialization.Iserializable
8.1.1.97       public class PlatformNotSupportedException :
    NotSupportedException,
    System.Runtime.Serialization.Iserializable
8.1.1.98       public class System.Security.Policy.PolicyException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.99       public class System.Net.ProtocolViolationException :
    InvalidOperationException,
    System.Runtime.Serialization.Iserializable
8.1.1.100  public class RankException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.101  public class System.Data.ReadOnlyException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.102  public sealed class System.Reflection.ReflectionTypeLoadException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.103  public class System.Runtime.Remoting.RemotingException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.104  public class System.Runtime.Remoting.RemotingTimeoutException :
    System.Runtime.Remoting.RemotingException,
    System.Runtime.Serialization.Iserializable
8.1.1.105  public class System.Data.RowNotInTableException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.106  public class System.Runtime.InteropServices.SafeArrayRankMismatchException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.107  public class System.Runtime.InteropServices.SafeArrayTypeMismatchException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.108  public class System.Security.SecurityException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.109  public class System.Runtime.InteropServices.SEHException :
    System.Runtime.InteropServices.ExternalException,
    System.Runtime.Serialization.Iserializable
8.1.1.110  public class System.Runtime.Serialization.SerializationException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.111  public class System.Runtime.Remoting.ServerException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.112  public class System.Web.Services.Protocols.SoapException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.113  public class System.Web.Services.Protocols.SoapHeaderException :
    System.Web.Services.Protocols.SoapException,
    System.Runtime.Serialization.Iserializable
8.1.1.114  public class System.Net.Sockets.SocketException :
    System.ComponentModel.Win32Exception,
    System.Runtime.Serialization.Iserializable
8.1.1.115  public sealed class System.Data.SqlClient.SqlException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.116  public sealed class System.Data.SqlTypes.SqlNullValueException :
    System.Data.SqlTypes.SqlTypeException,
    System.Runtime.Serialization.Iserializable
8.1.1.117  public sealed class System.Data.SqlTypes.SqlTruncateException :
    System.Data.SqlTypes.SqlTypeException,
    System.Runtime.Serialization.Iserializable
8.1.1.118  public class System.Data.SqlTypes.SqlTypeException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.119  public sealed class StackOverflowException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.120  public class System.Data.StrongTypingException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.121  public class System.Runtime.Remoting.MetadataServices.SUDSGeneratorException :
    Exception,
    System.Runtime.Serialization.Iserializable
8.1.1.122  public class System.Runtime.Remoting.MetadataServices.SUDSParserException :
    Exception,
    System.Runtime.Serialization.Iserializable
8.1.1.123  public class System.Threading.SynchronizationLockException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.124  public class System.Data.SyntaxErrorException :
    System.Data.InvalidExpressionException,
    System.Runtime.Serialization.Iserializable
8.1.1.125  public class SystemException :
    Exception,
    System.Runtime.Serialization.Iserializable
8.1.1.126  public class System.Reflection.TargetException :
    ApplicationException,
    System.Runtime.Serialization.Iserializable
8.1.1.127  public sealed class System.Reflection.TargetInvocationException :
    ApplicationException,
    System.Runtime.Serialization.Iserializable
8.1.1.128  public sealed class System.Reflection.TargetParameterCountException :
    ApplicationException,
    System.Runtime.Serialization.Iserializable
8.1.1.129  public sealed class System.Threading.ThreadAbortException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.130  public class System.Windows.Forms.ThreadExceptionDialog :
    System.Windows.Forms.Form,
    System.ComponentModel.IComponent,
    IDisposable,
    System.Windows.Forms.UnsafeNativeMethods+IOleControl,
    System.Windows.Forms.UnsafeNativeMethods+IOleObject,
    System.Windows.Forms.UnsafeNativeMethods+IOleInPlaceObject,
    System.Windows.Forms.UnsafeNativeMethods+IOleInPlaceActiveObject,
    System.Windows.Forms.UnsafeNativeMethods+IOleWindow,
    System.Windows.Forms.UnsafeNativeMethods+IViewObject,
    System.Windows.Forms.UnsafeNativeMethods+IViewObject2,
    System.Windows.Forms.UnsafeNativeMethods+IPersist,
    System.Windows.Forms.UnsafeNativeMethods+IPersistStreamInit,
    System.Windows.Forms.UnsafeNativeMethods+IPersistPropertyBag,
    System.Windows.Forms.UnsafeNativeMethods+IPersistStorage,
    System.Windows.Forms.UnsafeNativeMethods+IQuickActivate,
    System.ComponentModel.ISynchronizeInvoke,
    System.Windows.Forms.IWin32Window,
    System.Windows.Forms.IcontainerControl
8.1.1.131  public class System.Threading.ThreadExceptionEventArgs :
    EventArgs
8.1.1.132  public sealed class System.Threading.ThreadExceptionEventHandler :
    MulticastDelegate,
    ICloneable,
    System.Runtime.Serialization.Iserializable
8.1.1.133  public class System.Threading.ThreadInterruptedException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.134  public class System.Threading.ThreadStateException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.135  sealed class System.Threading.ThreadStopException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.136  public class System.ServiceProcess.TimeoutException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.137  public class System.Data.TypedDataSetGeneratorException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.138  public sealed class TypeInitializationException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.139  public class TypeLoadException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.140  public class TypeUnloadedException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.141  public class UnauthorizedAccessException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.142  public class UnhandledExceptionEventArgs :
    EventArgs
8.1.1.143  public sealed class UnhandledExceptionEventHandler :
    MulticastDelegate,
    ICloneable,
    System.Runtime.Serialization.Iserializable
8.1.1.144  public class UriFormatException :
    FormatException,
    System.Runtime.Serialization.Iserializable
8.1.1.145  public class System.Security.VerificationException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.146  public class System.Data.VersionNotFoundException :
    System.Data.DataException,
    System.Runtime.Serialization.Iserializable
8.1.1.147  public class System.ComponentModel.WarningException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.148  public class System.Net.WebException :
    InvalidOperationException,
    System.Runtime.Serialization.Iserializable
8.1.1.149  public enum System.Net.WebExceptionStatus
8.1.1.150  public class System.ComponentModel.Win32Exception :
    System.Runtime.InteropServices.ExternalException,
    System.Runtime.Serialization.Iserializable
8.1.1.151  public class System.Xml.XmlException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.152  public class System.Xml.Schema.XmlSchemaException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.153  public sealed class System.Security.XmlSyntaxException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.154  public class System.Xml.XPath.XPathException :
    SystemException,
    System.Runtime.Serialization.Iserializable
8.1.1.155  public class System.Xml.Xsl.XsltCompileException :
    System.Xml.Xsl.XsltException,
    System.Runtime.Serialization.Iserializable
8.1.1.156  public class System.Xml.Xsl.XsltException :
    SystemException,
    System.Runtime.Serialization.ISerializable

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

详细设计说明

一、            详细设计的目的与意义。

1、详细设计是针对需求,在代码实现之前的工作,它既是对代码实现工作的指导,又是对需求的进一步从软件角度的深化。

2、以前我们几乎没有设计,或者说有,也远远不够,这部分工作相当于建筑业的图纸设计。

3、搞好设计工作是研发工作重要的一环,在我们自己的研发过程中是必须的一环。

4、设计大部分靠的是经验,过去的项目经验,过去的积累对于设计工作的意义非常重大,注重日常项目经验的积累,是提高设计水平必经之路。

二、            针对我们自己的研发过程,设计都有哪些内容。

每个组织都有自己的设计要求,我们也不例外。设计主要有以下几个部分组成:

1、  体系设计

A、体系设计也可以叫做架构设计,软件越大,这部分重要性越明显。主要部分主要是各子系统如何组织以及如何协调工作。这种设计在目前的情况下(当然以后还要继续发展)以分层的体系是较为合适:

l        系统如何分层,分成三层(表现层、业务逻辑层、数据持久层)还是更多层。

l        各个层之间的如何通讯。

l        可借鉴的一些设计模式,如用得最多的MVC模式等。

B、子系统(或模块)设计,解决有系统要划分为哪些子系统,每个子系统又有哪些小功能模块,这些子系统(小模块)之间如何协作等。这部分可以认为是传统的设计。

C、横向(子系统)与纵向(分层)的关系。相当于软件的每个模块都处在哪个子系统,都在哪一层中。

2、  功能模块设计

对于每个子系统的所有功能模块,分重点、分缓急地设计其所包含的包、类、接口等等,以及其内部与外部的接合部分设计等等,应尽量细化,以方便实现。

3、  数据库及算法设计

此部分内容略。

4、  界面设计

对于c/sb/s界面设计在实际操作过程中是不大相同的。b/s界面设计大部分归于美工效果,而c/s设计大部分在于设计及程序员。

界面设计要考虑主界面或首页面、子页面、弹出窗体、每个页面的每个元素的大小、位置、形状、美学设计等等。从操作角度来看应考虑如何操作最方便,从美学角度来看应考虑如何设计最美观,从业务角度来看应考虑业务具体要求。等等。

5、  打包设计

也是非常重要的部分,c/s可以打包,b/s也同样可以打包,.net程序可以打包,java程序同样也可以打包。程序安装实际是给用户的第一感觉,同时也是实施的重要步骤,打包的好坏直接关系到实施的难度、技术要求等等。

这部分主要有安装步骤、注册表、安装目录、程序组、快捷方式、其它相关要求等等。

三、            与其它过程的关系

1、设计的主要依据:

《产品规格说明书》、相关数据库等各个方面的设计文档、交流与沟通的结果。

2、作为代码实现的主要依据。

四、            设计人员与程序员的工作关系

1、设计人员负责解释设计思路、设计细节等,并指导程序员的代码实现,对于难度较大的代码部分应由设计人员编码实现。

2、测试并检验程序员实现是否符合设计,并提出修改意见等。

五、            详细设计的文档要求。

1、详细设计说明书

2、UML文档

3、所建立的项目(project )文档,并交给程序员进行实现。

 
  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
完整的软件工程课程设计文档。 一、问题定义 7 二、可行性研究 8 1 引言 8 1.1 编写目的 8 1.2背景 8 1.3定义 8 1.4参考资料 8 2 任务概述 8 2.1要求 9 2.2目标 9 2.3 假定与约束 9 2.4 进行可行性研究的方法 9 2.5 评价尺度 9 3 对现有系统的分析 9 3.1处理流程与数据流程 10 3.2工作负荷 10 3.3费用开支 10 3.4设备 10 3.5局限性 10 4 社会因素方面的可行性 10 4.1法律方面的可行性 10 4.2人员方面的可行性 10 4.3其他因素可行性论证 11 5 投资及效益分析 11 5.1支出 11 5.2收益 12 6 结论 12 三、项目开发计划 13 1引言 13 1.1编写目的 13 1.2背景 13 1.2定义 13 1.2参考资料 13 2项目概述 13 2.1工作内容 13 2.2主要参加人员 13 2.3产品 14 2.4验收标准 14 2.5完成项目的最迟期限 15 3.实施计划 15 3.1工作任务的分解与人员分工 15 3.2接口人员 15 3.3进度 15 3.4关键问题 16 4.支持条件 16 四、需求分析说明书 17 1.引言 17 1.1 编写目的 17 1.2 背景 17 1.3 定义 17 1.4 参考资料 17 2.任务概述 17 2.1系统实现目标 18 2.2用户特点 19 2.3 假定与约束 19 3 需求规定 19 3.1 对功能的规定 19 3.2对性能的规定 21 3.3输入输出要求 21 3.4数据管理能力要求 22 3.5故障处理要求 22 3.6其他专门要求 22 4 运行环境规定 22 4.1 设备 22 4.2支持软件 22 4.2接口 23 4.2控制 23 五、概要设计说明书 24 1引言 24 1.1编写目的 24 1.2 背景 24 1.3 定义 24 1.4参考资料 24 2总体设计 24 2.1需求规定 24 2.2 运行环境 25 2.3 基本设计概念和处理流程 25 2.4结构 25 2.5 功能需求与程序的关系 26 2.6人工处理过程 26 2.7尚未问决的问题 26 3接口设计 26 3.1用户接口 26 3.2外部接口 27 3.3内部接口 27 4系统出错处理设计 27 4.1出错信息 27 4.2补救措施 27 4.3系统维护设计 27 六、数据库设计 28 1引言 28 1.1编写目的 28 1.2 背景 28 1.3 定义 28 1.4参考资料 28 2 外部设计 28 2.1标识符和状态 29 2.2使用它的程序 29 2.3约定 29 2.4 专门指导 29 2.5 支持软件 29 3 结构设计 29 3.1概念结构设计 29 3.2逻辑结构设计 32 3.3物理结构设计 33 4运用设计 34 4.1数据字典设计 34 4.2安全保密设计 35 七、详细设计 36 1引言 36 1.1编写目的 36 1.2背景 36 1.3定义 36 1.4参考资料 36 2程序系统的结构 36 3用户注册登录程序设计说明 37 3.1程序描述 37 3.2功能 37 3.4输人项 37 3.5输出项 37 3.6流程逻辑 38 4 用户查询程序设计说明 39 4.1程序描述 39 4.2功能 39 4.4输人项 39 4.5输出项 39 4.6流程逻辑 40 5 购书程序设计说明 41 5.1程序描述 41 5.2功能 41 5.4输人项 41 5.5输出项 41 5.6流程逻辑 41 6 订单程序设计说明 42 6.1程序描述 42 6.2功能 42 6.4输人项 42 6.5输出项 42 6.6流程逻辑 42 7 购物车程序设计说明 43 7.1程序描述 43 7.2功能 43 7.4输人项 43 7.5输出项 43 7.6流程逻辑 44 八、测试报告 45 1引言 45 1.1编写目的 45 1.2背景 45 1.3定义 45 1.4参考资料 46 2测试概要 46 3测试结果及发现 46 4对软件功能的测试 52 4.1能力 52 4.2限制 52 5分析摘要 52 5.1能力 53 5.1缺陷与限制 53 5.2建议 53 5.2评价 53 6测试资源消耗 53 九、用户手册 54 1. 引言 54 1.1 编写目的 54 1.2 背景 54 1.3 定义 54 1.4 参考资料 54 2. 用途 54 5.2功能 54 5.2安全保密 55 3. 运行环境 55 3.1 用户界面 55 3.2界面需求 57 3.2数据管理能力要求 58 3.2故障处理要求 58 3.5其他专门要求 58
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值