'msdn'에 해당되는 글 5건
- 2009/07/17 2009년 7월 16일 - sunyruru 미투데이 일기장
- 2009/04/03 Error Handling Guide - Rethrow to preserve stack details
- 2008/07/14 DHTML을 빠르게 하는 12가지 튜닝
- 2008/06/24 Remote Web part debugging
- 2007/09/05 MOSS 테크넷
- Windows 2008에서 Open Source Software 예를 들면 Apache,MySQL,PHP 환경 구성이 될까요?2009-07-16 10:08:27
- Microsoft OCS R2의 예제로 제공되는 Conference Audio Recording Server 문서를 보면 대화 내용을 녹음하거나 안내 메시지를 전송하는 등의 다양한 기능 등을 사용 하실 수 있다고 한다. 그치만 잘 보면 조건이 많다는.. ㅡㅡ;2009-07-16 10:23:33
- Microsoft Office 2010(Wave 14) 이 부분적인 기능으로 워드, 엑셀, 원노트 등등 '구글 Docs'처럼 웹에 일반사용자에게 공개된다고 하네요. 꽤 큰 반향을 일으킬 것 같은데.. 나오면 지켜보죠. 성능이나 속도도 중요한 면이니 ㅋㅋ2009-07-16 12:35:46
- 깜빡이라고 하는 영어단어 암기 기기가 있는데 이와 유사한 웹사이트가 있어요. 참 좋네요. 나중에 직접 만들어볼까 라고 생각도 했는데 안해도 되겠네요 ㅎㅎ2009-07-16 13:42:55
- 유명한 웹 포토샵입니다. 링크를 까먹었는데 간만에 찾아서 여기에 스크랩 샤샥 ㅋㅋ2009-07-16 13:56:43
- 김대중 전 대통령님의 병세 악화… 이것도 국민들은 2MB 탓이라고 하겠지??2009-07-16 15:36:57
- “Microsoft .NET 4.0에 포함될 F#의 내용을 보실 수 있습니다.”http://msdn.microsoft.com/en-us/fsharp/default.aspx 가끔씩 F#에 대한 내용을 보긴 했는데 아직은 좀 이해가 안되는 부분이 많아요 ㅠㅠ2009-07-16 16:59:52
이 글은 sunyruru님의 2009년 7월 16일의 미투데이 내용입니다.
'FunFun' 카테고리의 다른 글
| 2009년 7월 25일 - sunyruru 미투데이 일기장 (0) | 2009/07/25 |
|---|---|
| 2009년 7월 22일 - sunyruru 미투데이 일기장 (0) | 2009/07/23 |
| 2009년 7월 16일 - sunyruru 미투데이 일기장 (0) | 2009/07/17 |
| 2009년 07월 16일 - sunyruru 미투데이 일기장 (0) | 2009/07/16 |
| sunyruru의 미투데이 - 2009년 3월 22일 (0) | 2009/03/23 |
| sunyruru의 미투데이 - 2009년 3월 20일 (0) | 2009/03/21 |
Error Handling Guide - Rethrow to preserve stack details

훈스닷넷(Hoons.kr)에 다음과 같이 try - catch 구문에서 throw의 사용에 대해 질문이 올라왔습니다.
글쓴이: 주니
제목: try...catch 에 대해서...
2009-04-02 오후 8:57:59
주소 : http://www.hoons.kr/Board.aspx?Name=QAASPNET&Mode=2&BoardIdx=21940
aspx 페이지에서 biz단 함수를 호출하게 되고 biz단 함수에서는 dbbiz를 호출하게 됩니다.
그런 try catch 문을 세 곳 다 걸었습니다.
catch문에 에러로그를 남기기위해 에러로그 함수를 불렀다가 throw로 타는 형태로 되어있습니다.
제가 개념이 약해서 그런데..제일 마지막 dbbiz 단에서 에러가 나서 catch문을 타면 dbbiz catch만 타게 되는건가요?
아니면 다시 돌아오면서 catch문을 다 타게 되는건가요??
에러로그 함수 호출은 한곳만 불러야되는데...aspx에 넣어야할지..다 넣어야할지가 ㅡ.ㅡ;;;;;
이에 대한 저의 답변
에러 로그 함수는 aspx에서만 하시고요. Exception에 대해서 e로 받으셨다면 e.StackTrace 값을 찍어보시면 어디에서 부터 catch 되어 넘어왔는지 알 수 있습니다.
단, biz와 dbbiz에서 throw는 e를 던지는
throw e 구문은 StackTrace를 타지 않고, 해당 부분부터 다시 StackTrace를 시작하므로 나중에 어디서 에러가 났는지 찾기 힘들어집니다.
throw e; 형식보다 throw 형식으로만 던지도록 작성하세요.
참고하실 주소 : http://msdn.microsoft.com/ko-kr/library/ms182363.aspx
자세한 내용은 다음과 같이 MSDN의 설명이 있습니다.
참고하실 주소 : http://msdn.microsoft.com/ko-kr/library/ms182363.aspx
|
TypeName |
RethrowToPreserveStackDetails | |
|
CheckId |
CA2200 | |
|
Category |
Microsoft.Usage | |
|
Breaking Change |
Non Breaking (주요 변경 아님) | |
원인(Cause)
예외가 다시 throw되며 예외가 throw 문에 명시적으로 지정되어 있습니다.
An exception is re-thrown and the exception is explicitly specified in the throw statement.
규칙 설명 (Rule Description)
예외가 throw된 경우 예외가 제공하는 정보에는 스택 추적 정보가 포함되어 있습니다. 스택 추적은 예외를 throw한 메서드로 시작되어 예외를 catch한 메서드로 끝나는 메서드 호출 계층 구조 목록입니다. throw 문에 예외를 지정하여 예외가 다시 throw되면 현재 메서드에서 스택 추적이 다시 시작되고 예외를 throw한 원래 메서드와 현재 메서드 간의 메서드 호출 목록이 손실됩니다. 원래의 스택 추적 정보를 예외와 함께 유지하려면 예외를 지정하지 않고 throw 문을 사용합니다.
Once an exception is thrown, part of the information it carries is the stack trace. The stack trace is a list of the method call hierarchy that starts with the method that throws the exception and ends with the method that catches the exception. If an exception is re-thrown by specifying the exception in the throw statement, the stack trace is restarted at the current method and the list of method calls between the original method that threw the exception and the current method is lost. To keep the original stack trace information with the exception, use the throw statement without specifying the exception.
위반 문제를 해결하는 방법 (How to Fix Violations)
이 규칙 위반 문제를 해결하려면 예외를 명시적으로 지정하지 않고 예외를 다시 throw합니다.
To fix a violation of this rule, re-throw the exception without specifying the exception explicitly.
예제(Example)
다음 예제에서는 이 규칙을 위반하는 CatchAndRethrowExplicitly 메서드와 규칙을 충족하는 CatchAndRethrowImplicitly 메서드를 보여 줍니다.
The following example shows a method, CatchAndRethrowExplicitly, which violates the rule and a method, CatchAndRethrowImplicitly, which satisfies the rule.
using System;
namespace UsageLibrary
{
class TestsRethrow
{
static void Main()
{
TestsRethrow testRethrow = new TestsRethrow();
testRethrow.CatchException();
}
void CatchException()
{
try
{
CatchAndRethrowExplicitly();
}
catch(ArithmeticException e)
{
Console.WriteLine("Explicitly specified:{0}{1}",
Environment.NewLine, e.StackTrace);
}
try
{
CatchAndRethrowImplicitly();
}
catch(ArithmeticException e)
{
Console.WriteLine("{0}Implicitly specified:{0}{1}",
Environment.NewLine, e.StackTrace);
}
}
void CatchAndRethrowExplicitly()
{
try
{
ThrowException();
}
catch(ArithmeticException e)
{
// Violates the rule.
throw e;
}
}
void CatchAndRethrowImplicitly()
{
try
{
ThrowException();
}
catch(ArithmeticException e)
{
// Satisfies the rule.
throw;
}
}
void ThrowException()
{
throw new ArithmeticException("illegal expression");
}
}
}
천천히 분석해볼만 할거에요;;
'.NET > C#' 카테고리의 다른 글
| Better string.IsNullOrEmpty() ? How to do C#.NET 3.0 (0) | 2009/04/14 |
|---|---|
| C# - Length unit class , 길이 관련 클래스 (0) | 2009/04/10 |
| Error Handling Guide - Rethrow to preserve stack details (0) | 2009/04/03 |
| 훈스 C# 스터디 5주차 - CLR의 동작 , 메모리 관리, Boxing, UnBoxing, Generic (0) | 2009/03/11 |
| Different with ArrayList, List<T> – Boxing, None Boxing (0) | 2009/03/10 |
| 정규표현식(Regular Expression) Href URL 캡쳐(Capture) (0) | 2009/03/02 |
Faster DHTML in 12 Steps
http://msdn2.microsoft.com/en-us/library/ms533019(VS.85).aspx
MSDN 에서 빠른 DHTML 제공을 위한 12가지 튜닝에 대한 절차를 문서화한 내용입니다.
영문으로 제공되어 있지만 내용이 꼭 필요한 내용이고 그다지 어렵지 않은 단어로 되어 있어 보기 너무 어렵지는 않을거 같네요..(어렵다면 죄송.. -_ -)
원문의 목차를 보면 다음과 같습니다.(스크랩..)
The introduction of Dynamic HTML (DHTML) in Microsoft Internet Explorer 4.0 made available a new programming model to Web authors and developers. Since then, Web authors have taken advantage of this powerful feature to provide dynamic content, styles, and positioning, enabling a rich interactive experience for the Web user. Because of the flexibility of DHTML, there is often more than one way to accomplish what you want to do. Understanding how the HTML parsing and rendering component of Windows Internet Explorer processes your requests can give you the edge when deciding which methods work best for the job. This article describes how using some DHTML features can affect performance more than others, and it presents tips that will help your pages perform faster.
- Batch Your DHTML Changes
- Talk to Your innerText
- Use the DOM to Add Individual Elements
- Expand Your Options in a SELECT Element
- Use the DOM to Update Tables
- Write Once, Use Many Times
- Don't Be Too Dynamic with Your Properties
- Data Binding is Good for You
- Keep Your Expando Properties Off the Document
- Avoid switching classes and style rules
- Collapse a Text Range Before Finding the Parent
- Related Topics
DHTML을 개발하면서 크게 하는 실수는 너무 주관적인 생각만으로 하다보니 효용성이나 사용자 관점을 생각하지 못하는 실수를 하게되거나 퍼포먼스를 고려하지 않는 문제 또는 브라우져 호환성을 고려하지 않는 등의 문제가 발생할 수 있죠.
시간 나실 때 위 원문을 한번 보시는게 어떨지 ^ ^
관련글
2007/08/30 - [CSS] - IE와 W3C의 박스 차이에 의한 CSS 코딩 방식
2008/01/08 - [Sites] - HTML, CSS, JS 등 Markup과 DHTML의 기초를 위한 추천사이트
2008/01/31 - [JavaScript] - 드래그 드랍(Drag and Drop) 으로 개체의 정보 다루기
2008/02/12 - [JavaScript] - JavaScript Obejct 형식의 데이터를 덤프하여 내용 보기
'Web > JavaScript' 카테고리의 다른 글
| 스크립트에서 클라이언트 프로그램 실행 시키는 방법 (3) | 2009/02/17 |
|---|---|
| [js]브라우저의 오른쪽 상단의 X표시를 누르거나 창을 닫을때 이벤트 잡기! (1) | 2009/01/05 |
| DHTML을 빠르게 하는 12가지 튜닝 (0) | 2008/07/14 |
| 다양한 HTML 소스복사 / 마우스 우클릭 방지 모음 (2) | 2008/05/23 |
| 드래그 드랍(Drag and Drop) 으로 개체의 정보 다루기 (0) | 2008/03/06 |
| JavaScript Obejct 형식의 데이터를 덤프하여 내용 보기 (0) | 2008/02/12 |
이 글은 원격 컴퓨터의 웹파트를 디버그하고 개발하는 방법을 소개합니다.
내용은 MSDN의 내용을 발췌하였습니다.
Developing and Debugging from a Remote Computer
To use a remote computer to develop and debug, follow these steps.
Note To follow these steps, you must have a client computer running Visual Studio .NET (Computer_A) and a server computer running Windows SharePoint Services (Server_B).
- On Server_B, share the directory that hosts the SharePoint virtual server. By default, the Windows SharePoint Services virtual server is mapped to the following directory:
local_drive:\InetPub\wwwroot
- Ensure that you have Read and Write permissions for this directory and its sub-directories.
- On Server_B, share the directory in which the Microsoft.SharePoint.dll file is located. By default, the Microsoft.SharePoint.dll file is located in the following directory:
local_drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\ISAPI
- Make sure that you have Read permission for this directory.
- On Computer_A, follow these steps:
- Click Start, point to All Programs, point to Microsoft Visual Studio .NET, and then click Microsoft Visual Studio .NET.
- On the File menu in Visual Studio .NET, click Open.
- Browse to the Web Part project that you want to debug, and then click Open.
- Right-click the project name, and then click Properties.
- In the navigation tree, double-click Configuration Properties.
- Under Outputs, verify that the value for Output Path matches the following line:
remote_drive_on_Server_B:\InetPub\WWWRoot\bin\
- In Windows Explorer, browse to the following folder:
remote_drive_on_Server_B:\InetPub\WWWRoot\bin\.
- Double-click the Web.config file.
- In the Web.config file, search for the
<SafeControls>tag. - Verify that your assembly is listed as a Safe Control. If not, add the following line to the Safe Controls list.
<SafeControl Assembly="assembly_name, Version=assembly_version, Culture=assembly_culture, PublicKeyToken=assembly_public_key_token" Namespace="assembly_namespace" TypeName="*" Safe="True"/>
- Save and close the file.
- On Server_B, install and configure the remote debugging services.
For more information about remote debugging, visit the following MSDN Web site: Visual Studio: Setting Up Remote Debugging.
Problems Saving Output
When you debug or modify an assembly, you may receive the following error message:
Unable to replace file_name.dll after compilation.
This behavior may occur if the W3wp.exe process locks the old copy of the assembly located in the InetPub\WWWRoot\bin directory. To resolve this issue, use Task Manager to end the W3wp.exe process, recompile the assembly, and then resume the debugging process.
Conclusion
Web Parts for Windows SharePoint Services are ASP.NET server controls. Therefore, the process for debugging Web Parts is similar to the process for debugging ASP.NET server controls.
'Microsoft > SPS/MOSS' 카테고리의 다른 글
| Remote Web part debugging (0) | 2008/06/24 |
|---|---|
| MOSS 웹파트 연결 예제 (0) | 2008/05/21 |
| MOSS2007과 Community Server 사용자 DB의 통합 (0) | 2007/11/23 |
| MOSS STSADM의 명령어 목록 (0) | 2007/11/09 |
| 임지훈 - ezEKP.net 설치 및 구성 세미나 (0) | 2007/11/08 |
| MS MOSS 개발자의 버그 발견 (0) | 2007/10/31 |
http://technet2.microsoft.com/windowsserver/WSS/en/library/700c3d60-f394-4ca9-a6d8-ab597fc3c31b1033.mspx?mfr=true
http://technet2.microsoft.com/windowsserver/WSS/en/library/74f80404-bfba-43b5-8941-95c4795df9d11033.mspx?mfr=true
TechNet MOSS 2007 아 죽겠다... 모스 모스~
'Microsoft > SPS/MOSS' 카테고리의 다른 글
| Active directory how to (0) | 2007/09/06 |
|---|---|
| Active Directory ㅠ_ㅠ (0) | 2007/09/06 |
| MOSS 테크넷 (0) | 2007/09/05 |
| Active directory 제어 (0) | 2007/09/05 |
| MOSS Custom 검색을 위한 Webpart를 만들기 위한 예제 코드 (0) | 2007/09/01 |
| MOSS SharePoint Server 2007 SDK (0) | 2007/08/30 |
Prev




